Changeset View
Changeset View
Standalone View
Standalone View
src/unit/engine/PhpunitTestEngine.php
Context not available. | |||||
// Not sure if it would make sense to go further if | // Not sure if it would make sense to go further if | ||||
// it is not a .php file | // it is not a .php file | ||||
if (substr($path, -4) != '.php') { | if (@substr($path, -4) != '.php') { | ||||
continue; | continue; | ||||
} | } | ||||
if (substr($path, -8) == 'Test.php') { | if (@substr($path, -8) == 'Test.php') { | ||||
// Looks like a valid test file name. | // Looks like a valid test file name. | ||||
$this->affectedTests[$path] = $path; | $this->affectedTests[$path] = $path; | ||||
continue; | continue; | ||||
Context not available. | |||||
$file = basename($path); | $file = basename($path); | ||||
$possible_files = array( | $possible_files = array( | ||||
$file, | $file, | ||||
substr($file, 0, -4).'Test.php', | @substr($file, 0, -4).'Test.php', | ||||
); | ); | ||||
$search = self::getSearchLocationsForTests($path); | $search = self::getSearchLocationsForTests($path); | ||||
Context not available. | |||||
// Try replacing each directory component with 'tests/'. | // Try replacing each directory component with 'tests/'. | ||||
$parts = trim($dir, DIRECTORY_SEPARATOR); | $parts = trim($dir, DIRECTORY_SEPARATOR); | ||||
$parts = explode(DIRECTORY_SEPARATOR, $parts); | $parts = @explode(DIRECTORY_SEPARATOR, $parts); | ||||
foreach (array_reverse(array_keys($parts)) as $key) { | foreach (array_reverse(array_keys($parts)) as $key) { | ||||
foreach ($test_dir_names as $test_dir_name) { | foreach ($test_dir_names as $test_dir_name) { | ||||
$try = $parts; | $try = $parts; | ||||
Context not available. |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0