Changeset View
Changeset View
Standalone View
Standalone View
src/unit/engine/CSharpToolsTestEngine.php
Context not available. | |||||
} | } | ||||
} | } | ||||
if ($this->matchRegex !== null) { | if ($this->matchRegex !== null) { | ||||
if (preg_match($this->matchRegex, $file) === 1) { | if (@preg_match($this->matchRegex, $file) === 1) { | ||||
return true; | return true; | ||||
} else { | } else { | ||||
return false; | return false; | ||||
Context not available. | |||||
$assembly_dir = dirname($test_assembly); | $assembly_dir = dirname($test_assembly); | ||||
$assemblies_to_instrument = array(); | $assemblies_to_instrument = array(); | ||||
foreach (Filesystem::listDirectory($assembly_dir) as $file) { | foreach (Filesystem::listDirectory($assembly_dir) as $file) { | ||||
if (substr($file, -4) == '.dll' || substr($file, -4) == '.exe') { | if (@substr($file, -4) == '.dll' || @substr($file, -4) == '.exe') { | ||||
if ($this->assemblyShouldBeInstrumented($file)) { | if ($this->assemblyShouldBeInstrumented($file)) { | ||||
$assemblies_to_instrument[] = $assembly_dir.DIRECTORY_SEPARATOR.$file; | $assemblies_to_instrument[] = $assembly_dir.DIRECTORY_SEPARATOR.$file; | ||||
} | } | ||||
Context not available. | |||||
foreach ($instrumented as $instrument) { | foreach ($instrumented as $instrument) { | ||||
$absolute_file = $instrument['file']; | $absolute_file = $instrument['file']; | ||||
$relative_file = substr($absolute_file, strlen($this->projectRoot) + 1); | $relative_file = @substr($absolute_file, @strlen($this->projectRoot) + 1); | ||||
if (!in_array($relative_file, $files)) { | if (!in_array($relative_file, $files)) { | ||||
$files[] = $relative_file; | $files[] = $relative_file; | ||||
} | } | ||||
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