Skip to content

Commit 6933232

Browse files
[ExpressionLanguage] fix tests
1 parent 2774df9 commit 6933232

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Tests/Node/BinaryNodeTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,23 +173,23 @@ public function testEvaluateMatchesWithInvalidRegexp()
173173
{
174174
$node = new BinaryNode('matches', new ConstantNode('abc'), new ConstantNode('this is not a regexp'));
175175

176-
$this->expectExceptionObject(new SyntaxError('Regexp "this is not a regexp" passed to "matches" is not valid: Delimiter must not be alphanumeric or backslash'));
176+
$this->expectExceptionObject(new SyntaxError('Regexp "this is not a regexp" passed to "matches" is not valid: Delimiter must not be alphanumeric'));
177177
$node->evaluate([], []);
178178
}
179179

180180
public function testEvaluateMatchesWithInvalidRegexpAsExpression()
181181
{
182182
$node = new BinaryNode('matches', new ConstantNode('abc'), new NameNode('regexp'));
183183

184-
$this->expectExceptionObject(new SyntaxError('Regexp "this is not a regexp" passed to "matches" is not valid: Delimiter must not be alphanumeric or backslash'));
184+
$this->expectExceptionObject(new SyntaxError('Regexp "this is not a regexp" passed to "matches" is not valid: Delimiter must not be alphanumeric'));
185185
$node->evaluate([], ['regexp' => 'this is not a regexp']);
186186
}
187187

188188
public function testCompileMatchesWithInvalidRegexp()
189189
{
190190
$node = new BinaryNode('matches', new ConstantNode('abc'), new ConstantNode('this is not a regexp'));
191191

192-
$this->expectExceptionObject(new SyntaxError('Regexp "this is not a regexp" passed to "matches" is not valid: Delimiter must not be alphanumeric or backslash'));
192+
$this->expectExceptionObject(new SyntaxError('Regexp "this is not a regexp" passed to "matches" is not valid: Delimiter must not be alphanumeric'));
193193
$compiler = new Compiler([]);
194194
$node->compile($compiler);
195195
}
@@ -198,7 +198,7 @@ public function testCompileMatchesWithInvalidRegexpAsExpression()
198198
{
199199
$node = new BinaryNode('matches', new ConstantNode('abc'), new NameNode('regexp'));
200200

201-
$this->expectExceptionObject(new SyntaxError('Regexp "this is not a regexp" passed to "matches" is not valid: Delimiter must not be alphanumeric or backslash'));
201+
$this->expectExceptionObject(new SyntaxError('Regexp "this is not a regexp" passed to "matches" is not valid: Delimiter must not be alphanumeric'));
202202
$compiler = new Compiler([]);
203203
$node->compile($compiler);
204204
eval('$regexp = "this is not a regexp"; '.$compiler->getSource().';');

0 commit comments

Comments
 (0)