diff --git a/src/Codeception/Command/Run.php b/src/Codeception/Command/Run.php index c0f25d5ccc..568b0ccda1 100644 --- a/src/Codeception/Command/Run.php +++ b/src/Codeception/Command/Run.php @@ -540,7 +540,14 @@ protected function matchTestFromFilename($filename, $testsPath) { $filter = ''; if (strpos($filename, ':') !== false) { - list($filename, $filter) = explode(':', $filename, 2); + if ((PHP_OS === 'Windows' || PHP_OS === 'WINNT') && $filename[1] === ':') { + // match C:\... + list($drive, $path, $filter) = explode(':', $filename, 3); + $filename = $drive . ':' . $path; + } else { + list($filename, $filter) = explode(':', $filename, 2); + } + if ($filter) { $filter = ':' . $filter; }