mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-14 19:36:43 +00:00
Merge branch '1.x' into 2.x
* 1.x: fixed CS fixed some PHPUnit assertions
This commit is contained in:
@@ -149,7 +149,7 @@ class Twig_Tests_Loader_FilesystemTest extends \PHPUnit\Framework\TestCase
|
||||
try {
|
||||
$loader->getSourceContext('@named/nowhere.html');
|
||||
} catch (\Exception $e) {
|
||||
$this->assertInstanceof('Twig_Error_Loader', $e);
|
||||
$this->assertInstanceOf('Twig_Error_Loader', $e);
|
||||
$this->assertContains('Unable to find template "@named/nowhere.html"', $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ class Twig_Tests_Node_ForTest extends Twig_Test_NodeTestCase
|
||||
$this->assertEquals($valueTarget, $node->getNode('value_target'));
|
||||
$this->assertEquals($seq, $node->getNode('seq'));
|
||||
$this->assertTrue($node->getAttribute('ifexpr'));
|
||||
$this->assertEquals('Twig_Node_If', \get_class($node->getNode('body')));
|
||||
$this->assertInstanceOf('Twig_Node_If', $node->getNode('body'));
|
||||
$this->assertEquals($body, $node->getNode('body')->getNode('tests')->getNode(1)->getNode(0));
|
||||
$this->assertFalse($node->hasNode('else'));
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends \PHPUnit\Framework\TestCase
|
||||
|
||||
$node = $stream->getNode('body')->getNode(0);
|
||||
|
||||
$this->assertEquals('Twig_Node_Expression_BlockReference', \get_class($node));
|
||||
$this->assertInstanceOf('Twig_Node_Expression_BlockReference', $node);
|
||||
$this->assertTrue($node->getAttribute('output'));
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends \PHPUnit\Framework\TestCase
|
||||
|
||||
$node = $stream->getNode('blocks')->getNode('content')->getNode(0)->getNode('body');
|
||||
|
||||
$this->assertEquals('Twig_Node_Expression_Parent', \get_class($node));
|
||||
$this->assertInstanceOf('Twig_Node_Expression_Parent', $node);
|
||||
$this->assertTrue($node->getAttribute('output'));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user