Example #1
0
 /**
  * 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; ?>');
     self::$testClassWasLoaded = FALSE;
     $this->classLoader->setConsiderTestsNamespace(TRUE);
     $this->classLoader->loadClass('Acme\\MyApp\\Tests\\Functional\\Essentials\\LawnMowerTest');
     $this->assertTrue(self::$testClassWasLoaded);
 }