Closes #16411. Fix windows tests (#17380)

* Fix `\yiiunit\framework\helpers\ConsoleTest::testErrorSummary`
* Fix `\yiiunit\framework\console\controllers\PHPMessageControllerTest::testRemoveUnusedBehavior`
This commit is contained in:
Alexander Kartavenko
2019-06-19 16:48:20 +03:00
committed by Alexander Makarov
parent 27463c1fcf
commit c5397f8784
5 changed files with 18 additions and 6 deletions

View File

@ -903,6 +903,7 @@ EOD;
$categoryFileName = str_replace($dirName, '', $messageFile);
$categoryFileName = ltrim($categoryFileName, DIRECTORY_SEPARATOR);
$category = preg_replace('#\.php$#', '', $categoryFileName);
$category = str_replace(DIRECTORY_SEPARATOR, '/', $category);
if (!in_array($category, $existingCategories, true)) {
unlink($messageFile);