Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tests/Standards/AbstractSniffUnitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,18 +93,18 @@ protected final function runTest()
if (is_file(dirname(__FILE__).'/../../CodeSniffer.php') === true) {
// We have not been installed.
$standardsDir = realpath(dirname(__FILE__).'/../../CodeSniffer/Standards');
$testFileBase = $standardsDir.'/'.str_replace('_', '/', $basename).'UnitTest.';
$testFileBase = $standardsDir.DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $basename).'UnitTest.';
} else {
// The name of the dummy file we are testing.
$testFileBase = dirname(__FILE__).'/'.str_replace('_', '/', $basename).'UnitTest.';
$testFileBase = dirname(__FILE__).DIRECTORY_SEPARATOR.str_replace('_', DIRECTORY_SEPARATOR, $basename).'UnitTest.';
}

// Get a list of all test files to check. These will have the same base
// name but different extensions. We ignore the .php file as it is the
// class.
$testFiles = array();

$dir = substr($testFileBase, 0, strrpos($testFileBase, '/'));
$dir = substr($testFileBase, 0, strrpos($testFileBase, DIRECTORY_SEPARATOR));
$di = new DirectoryIterator($dir);

foreach ($di as $file) {
Expand Down