diff --git a/tests/Extension/EscaperTest.php b/tests/Extension/EscaperTest.php index c465789153..d8fedc64e2 100644 --- a/tests/Extension/EscaperTest.php +++ b/tests/Extension/EscaperTest.php @@ -17,7 +17,7 @@ use Twig\Extension\EscaperExtension; use Twig\Loader\LoaderInterface; -class Twig_Tests_Extension_EscaperTest extends TestCase +class EscaperTest extends TestCase { /** * All character encodings supported by htmlspecialchars(). diff --git a/tests/Fixtures/functions/include/template_instance.test b/tests/Fixtures/functions/include/template_instance.test index 4c8b450835..be18d244ac 100644 --- a/tests/Fixtures/functions/include/template_instance.test +++ b/tests/Fixtures/functions/include/template_instance.test @@ -1,5 +1,5 @@ --TEST-- -"include" function accepts Twig_Template instance +"include" function accepts Twig\Template instance --TEMPLATE-- {{ include(foo) }} FOO --TEMPLATE(foo.twig)-- diff --git a/tests/Fixtures/tags/inheritance/parent_as_template_wrapper.test b/tests/Fixtures/tags/inheritance/parent_as_template_wrapper.test index 1aaed556c5..cf257f25dc 100644 --- a/tests/Fixtures/tags/inheritance/parent_as_template_wrapper.test +++ b/tests/Fixtures/tags/inheritance/parent_as_template_wrapper.test @@ -1,5 +1,5 @@ --TEST-- -"extends" tag with a parent as a Twig_TemplateWrapper instance +"extends" tag with a parent as a Twig\TemplateWrapper instance --TEMPLATE-- {% extends foo %} diff --git a/tests/Fixtures/tags/inheritance/template_instance.test b/tests/Fixtures/tags/inheritance/template_instance.test index a5a223886d..b9009e5df5 100644 --- a/tests/Fixtures/tags/inheritance/template_instance.test +++ b/tests/Fixtures/tags/inheritance/template_instance.test @@ -1,5 +1,5 @@ --TEST-- -"extends" tag accepts Twig_Template instance +"extends" tag accepts Twig\Template instance --TEMPLATE-- {% extends foo %} diff --git a/tests/Node/Expression/CallTest.php b/tests/Node/Expression/CallTest.php index 10fa00bea6..4705120764 100644 --- a/tests/Node/Expression/CallTest.php +++ b/tests/Node/Expression/CallTest.php @@ -125,10 +125,10 @@ public function customFunctionWithArbitraryArguments() public function testResolveArgumentsWithMissingParameterForArbitraryArgumentsOnFunction() { $this->expectException(\LogicException::class); - $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 \\= \\[\\]"\\.$#'); + $this->expectExceptionMessageMatches('#^The last parameter of "Twig\\\\Tests\\\\Node\\\\Expression\\\\custom_call_test_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', []); + $node->getArguments('Twig\Tests\Node\Expression\custom_call_test_function', []); } public function testResolveArgumentsWithMissingParameterForArbitraryArgumentsOnObject() @@ -156,6 +156,6 @@ public function __invoke($required) } } -function custom_Twig_Tests_Node_Expression_CallTest_function($required) +function custom_call_test_function($required) { } diff --git a/tests/Util/DeprecationCollectorTest.php b/tests/Util/DeprecationCollectorTest.php index 7b5794d83c..18f889f6a4 100644 --- a/tests/Util/DeprecationCollectorTest.php +++ b/tests/Util/DeprecationCollectorTest.php @@ -28,7 +28,7 @@ public function testCollect() $twig->addFunction(new TwigFunction('deprec', [$this, 'deprec'], ['deprecated' => '1.1'])); $collector = new DeprecationCollector($twig); - $deprecations = $collector->collect(new Twig_Tests_Util_Iterator()); + $deprecations = $collector->collect(new Iterator()); $this->assertEquals(['Twig Function "deprec" is deprecated since version 1.1 in deprec.twig at line 1.'], $deprecations); } @@ -38,7 +38,7 @@ public function deprec() } } -class Twig_Tests_Util_Iterator implements \IteratorAggregate +class Iterator implements \IteratorAggregate { public function getIterator(): \Traversable {