private function randomizeSuiteThatContainsOtherSuites($suite, $seed)
    {
        $order = 0;
        foreach ($suite->tests() as $test) {
            if ($test instanceof \PHPUnit\Framework\TestSuite && $this->testSuiteContainsOtherSuites($test)) {
                $this->randomizeSuiteThatContainsOtherSuites($test, $seed);
            }
            if ($test instanceof \PHPUnit\Framework\TestSuite) {
                $this->randomizeSuite($test, $seed, $this->order);
            }
            $this->order++;
        }
        return $this->randomizeSuite($suite, $seed, $this->order, false);
    }
private function randomizeSuiteThatContainsOtherSuites($suite, $seed)
    {
        $order = 0;
        foreach ($suite->tests() as $test) {
            if ($test instanceof \PHPUnit\Framework\TestSuite && $this->testSuiteContainsOtherSuites($test)) {
                $this->randomizeSuiteThatContainsOtherSuites($test, $seed);
            }
            if ($test instanceof \PHPUnit\Framework\TestSuite) {
                $this->randomizeSuite($test, $seed, $this->order);
            }
            $this->order++;
        }
        return $this->randomizeSuite($suite, $seed, $this->order, false);
    }
private function randomizeSuiteThatContainsOtherSuites ( $ suite , $ seed ) { $ order = 0 ; foreach ( $ suite -> tests ( ) as $ test ) { if ( $ test instanceof \ PHPUnit \ Framework \ TestSuite && $ this -> testSuiteContainsOtherSuites ( $ test ) ) { $ this -> randomizeSuiteThatContainsOtherSuites ( $ test , $ seed ) ; } if ( $ test instanceof \ PHPUnit \ Framework \ TestSuite ) { $ this -> randomizeSuite ( $ test , $ seed , $ this -> order ) ; } $ this -> order ++ ; } return $ this -> randomizeSuite ( $ suite , $ seed , $ this -> order , false ) ; }
Randomize each Test Suite inside the main Test Suite.

@param  [type] $suite Main Test Suite to randomize.
@param  [type] $seed  Seed to use.
@return \PHPUnit\Framework\Test
Randomize each Test Suite inside the main Test Suite .