@@ -24,7 +24,7 @@ public function testBlockVariableInsteadOfThis()
24
24
* @param string $file
25
25
*/
26
26
function ($ file ) {
27
- self ::assertNotRegExp (
27
+ self ::assertDoesNotMatchRegularExpression (
28
28
'/this->(?!helper)\S*/iS ' ,
29
29
file_get_contents ($ file ),
30
30
'Access to members and methods of Block class through $this is ' .
@@ -51,7 +51,7 @@ public function testObsoleteBlockMethods()
51
51
* @param string $file
52
52
*/
53
53
function ($ file ) {
54
- self ::assertNotRegexp (
54
+ self ::assertDoesNotMatchRegularExpression (
55
55
'/block->_[^_]+\S*\(/iS ' ,
56
56
file_get_contents ($ file ),
57
57
'Access to protected and private members of Block class is ' .
@@ -73,7 +73,7 @@ public function testObsoleteJavascriptAttributeType()
73
73
* @param string $file
74
74
*/
75
75
function ($ file ) {
76
- self ::assertNotRegexp (
76
+ self ::assertDoesNotMatchRegularExpression (
77
77
'/type="text\/javascript"/ ' ,
78
78
file_get_contents ($ file ),
79
79
'Please do not use "text/javascript" type attribute. '
@@ -97,7 +97,7 @@ function ($file) {
97
97
if (strpos ($ file , '/view/frontend/templates/ ' ) !== false
98
98
|| strpos ($ file , '/view/base/templates/ ' ) !== false
99
99
) {
100
- self ::assertNotRegexp (
100
+ self ::assertDoesNotMatchRegularExpression (
101
101
'/([" \'])jquery\/ui\1/ ' ,
102
102
file_get_contents ($ file ),
103
103
'Please do not use "jquery/ui" library in templates. Use needed jquery ui widget instead. '
@@ -124,7 +124,7 @@ function ($file) {
124
124
&& (strpos ($ file , '/view/frontend/templates/ ' ) !== false
125
125
|| strpos ($ file , '/view/base/templates/ ' ) !== false )
126
126
) {
127
- self ::assertNotRegExp (
127
+ self ::assertDoesNotMatchRegularExpression (
128
128
'/data-mage-init=(?: \'|")(?!\s*{\s*"[^"]+")/ ' ,
129
129
file_get_contents ($ file ),
130
130
'Please do not initialize JS component in php. Do it in template. '
@@ -177,7 +177,7 @@ function ($file) {
177
177
if (strpos ($ file , '/view/frontend/templates/ ' ) !== false
178
178
|| strpos ($ file , '/view/base/templates/ ' ) !== false
179
179
) {
180
- self ::assertNotRegExp (
180
+ self ::assertDoesNotMatchRegularExpression (
181
181
'@x-magento-init.>(?!\s*+{\s*"[^"]+"\s*:\s*{\s*"[\w/-]+")@i ' ,
182
182
file_get_contents ($ file ),
183
183
'Please do not initialize JS component in php. Do it in template. '
0 commit comments