/**
  * @test
  */
 public function findTestCaseFilesInDirectoryNotFindsFixtureClassesWithLowercasePath()
 {
     if (!t3lib_extMgm::isLoaded('aaa')) {
         $this->markTestSkipped('This test can only be run if the extension "aaa" from Tests/Unit/Fixtures/Extensions/ is installed.');
     }
     $path = t3lib_extMgm::extPath('aaa') . 'Tests/Unit/';
     $fileName = 'AnotherTest.php';
     $this->assertNotContains($fileName, $this->fixture->findTestCaseFilesInDirectory($path));
 }
Exemplo n.º 2
0
 /**
  * @test
  */
 public function findTestCaseFilesInDirectoryNotFindsFixtureClassesWithLowercasePath()
 {
     if (!ExtensionManagementUtility::isLoaded('aaa')) {
         self::markTestSkipped('This test can only be run if the extension "aaa" from TestExtensions/ is installed.');
     }
     $path = ExtensionManagementUtility::extPath('aaa') . 'Tests/Unit/';
     $fileName = 'AnotherTest.php';
     self::assertNotContains($fileName, $this->subject->findTestCaseFilesInDirectory($path));
 }
Exemplo n.º 3
0
 /**
  * Recursively finds all test case files in the directory $directory.
  *
  * @param string $directory
  *        the absolute path of the directory in which to look for test cases,
  *        must not be empty
  *
  * @return array<array><string>
  *         files names of the test cases in the directory $dir and all
  *         its subdirectories relative to $dir, will be empty if no
  *         test cases have been found
  */
 protected function findTestCasesInDir($directory)
 {
     if (!is_dir($directory)) {
         return array();
     }
     $testCaseFileNames = $this->testCaseService->findTestCaseFilesInDirectory($directory);
     $extensionsArr = array();
     if (!empty($testCaseFileNames)) {
         $extensionsArr[$directory] = $testCaseFileNames;
     }
     return $extensionsArr;
 }