mirror of
https://github.com/twigphp/Twig.git
synced 2026-08-31 20:47:28 +00:00
Fix some inconsistencies
This commit is contained in:
@@ -17,7 +17,7 @@ use Twig\Error\RuntimeError;
|
||||
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().
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
"include" function accepts Twig_Template instance
|
||||
"include" function accepts Twig\Template instance
|
||||
--TEMPLATE--
|
||||
{{ include(foo) }} FOO
|
||||
--TEMPLATE(foo.twig)--
|
||||
|
||||
@@ -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 %}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
--TEST--
|
||||
"extends" tag accepts Twig_Template instance
|
||||
"extends" tag accepts Twig\Template instance
|
||||
--TEMPLATE--
|
||||
{% extends foo %}
|
||||
|
||||
|
||||
@@ -125,10 +125,10 @@ class CallTest extends TestCase
|
||||
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 @@ class CallableTestClass
|
||||
}
|
||||
}
|
||||
|
||||
function custom_Twig_Tests_Node_Expression_CallTest_function($required)
|
||||
function custom_call_test_function($required)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class DeprecationCollectorTest extends TestCase
|
||||
$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 @@ class DeprecationCollectorTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
class Twig_Tests_Util_Iterator implements \IteratorAggregate
|
||||
class Iterator implements \IteratorAggregate
|
||||
{
|
||||
public function getIterator(): \Traversable
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user