Sets the flag which enables or disables autoloading support for functional
test files.
public setConsiderTestsNamespace ( boolean $flag ) : void | ||
$flag | boolean | |
return | void |
/** * Checks if the class loader loads classes from the functional tests directory * * @test */ public function classesFromFunctionalTestsDirectoriesAreLoaded() { mkdir('vfs://Test/Packages/Application/Acme.MyApp/Tests/Functional/Essentials', 0770, true); file_put_contents('vfs://Test/Packages/Application/Acme.MyApp/Tests/Functional/Essentials/LawnMowerTest.php', '<?php ' . __CLASS__ . '::$testClassWasLoaded = TRUE; ?>'); $this->classLoader->setConsiderTestsNamespace(true); $this->classLoader->setPackages($this->mockPackages); $this->classLoader->loadClass('Acme\\MyApp\\Tests\\Functional\\Essentials\\LawnMowerTest'); $this->assertTrue(self::$testClassWasLoaded); }