From f787c032abc34c600ec4fd190e3d78ac1f51931d Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sun, 23 Aug 2020 12:47:51 +0200 Subject: [PATCH] Migrate more tests --- tests/Node/Expression/CallTest.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Node/Expression/CallTest.php b/tests/Node/Expression/CallTest.php index 7672d58bd..fb6354b90 100644 --- a/tests/Node/Expression/CallTest.php +++ b/tests/Node/Expression/CallTest.php @@ -107,7 +107,7 @@ class CallTest extends \PHPUnit\Framework\TestCase public function testResolveArgumentsWithMissingParameterForArbitraryArgumentsOnFunction() { $this->expectException('\LogicException'); - $this->expectExceptionMessageRegExp('#^The last parameter of "Twig\\\\Tests\\\\Node\\\\Expression\\\\custom_Twig_Tests_Node_Expression_CallTest_function" for function "foo" must be an array with default value, eg\\. "array \\$arg \\= \\[\\]"\\.$#'); + $this->expectExceptionMessageMatches('#^The last parameter of "Twig\\\\Tests\\\\Node\\\\Expression\\\\custom_Twig_Tests_Node_Expression_CallTest_function" for function "foo" must be an array with default value, eg\\. "array \\$arg \\= \\[\\]"\\.$#'); $node = new Node_Expression_Call([], ['type' => 'function', 'name' => 'foo', 'is_variadic' => true]); $node->getArguments('Twig\Tests\Node\Expression\custom_Twig_Tests_Node_Expression_CallTest_function', []); @@ -116,7 +116,7 @@ class CallTest extends \PHPUnit\Framework\TestCase public function testResolveArgumentsWithMissingParameterForArbitraryArgumentsOnObject() { $this->expectException('\LogicException'); - $this->expectExceptionMessageRegExp('#^The last parameter of "Twig\\\\Tests\\\\Node\\\\Expression\\\\CallableTestClass\\:\\:__invoke" for function "foo" must be an array with default value, eg\\. "array \\$arg \\= \\[\\]"\\.$#'); + $this->expectExceptionMessageMatches('#^The last parameter of "Twig\\\\Tests\\\\Node\\\\Expression\\\\CallableTestClass\\:\\:__invoke" for function "foo" must be an array with default value, eg\\. "array \\$arg \\= \\[\\]"\\.$#'); $node = new Node_Expression_Call([], ['type' => 'function', 'name' => 'foo', 'is_variadic' => true]); $node->getArguments(new CallableTestClass(), []);