Skip to content

Commit 71d399f

Browse files
committed
MAGETWO-33064: Implement obsolete test for refactored controllers
1 parent a44395a commit 71d399f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

dev/tests/static/testsuite/Magento/Test/Legacy/ObsoleteResponseTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,10 @@ public function testObsoleteResponseMethods()
4444
function ($file) {
4545
$content = file_get_contents($file);
4646
foreach ($this->obsoleteMethods as $method) {
47+
$quotedMethod = preg_quote($method, '/');
4748
$this->assertSame(
4849
0,
49-
preg_match('/(?<=[a-z\d_:]|->|function\s)' . $method . '\s*\(/iS', $content),
50+
preg_match('/(?<=[a-z\d_:]|->|function\s)' . $quotedMethod . '\s*\(/iS', $content),
5051
"File: $file\nContains obsolete method: $method . "
5152
);
5253
}
@@ -66,7 +67,8 @@ public function modulesFilesDataProvider()
6667

6768
foreach ($this->getFilesData('whitelist/refactored_modules*') as $refactoredFolder) {
6869
$files = \Magento\Framework\Test\Utility\Files::init()->getFiles(
69-
[$this->appPath . $refactoredFolder], '*.php'
70+
[$this->appPath . $refactoredFolder],
71+
'*.php'
7072
);
7173
$filesList = array_merge($filesList, $files);
7274
}

0 commit comments

Comments
 (0)