Skip to content

Commit eedc705

Browse files
author
Oleksii Korshenko
committed
MAGETWO-69868: Fix static integrity classes tests in Windows #9902
- Merge Pull Request #9902 from barbazul/magento2:fix-integrity-tests - Merged commits: 1. e9f65d6 2. ad2bb5c 3. df27f99 4. 2b80b9e
2 parents 2c89e48 + 2b80b9e commit eedc705

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,12 @@ public function testClassReferences()
290290
function ($file) {
291291
$relativePath = str_replace(BP, "", $file);
292292
// Due to the examples given with the regex patterns, we skip this test file itself
293-
if ($relativePath == "/dev/tests/static/testsuite/Magento/Test/Integrity/ClassesTest.php") {
293+
if (
294+
preg_match(
295+
'/\/dev\/tests\/static\/testsuite\/Magento\/Test\/Integrity\/ClassesTest.php$/',
296+
$relativePath
297+
)
298+
) {
294299
return;
295300
}
296301
$contents = file_get_contents($file);
@@ -601,7 +606,7 @@ public function testCoversAnnotation()
601606
$errors = [];
602607
$filesToTest = $files->getPhpFiles(Files::INCLUDE_TESTS);
603608

604-
if (($key = array_search(__FILE__, $filesToTest)) !== false) {
609+
if (($key = array_search(str_replace('\\', '/', __FILE__), $filesToTest)) !== false) {
605610
unset($filesToTest[$key]);
606611
}
607612

0 commit comments

Comments
 (0)