Merge branch '1.x' into 2.x

* 1.x:
  fixed CS
  fixed some PHPUnit assertions
This commit is contained in:
Fabien Potencier
2019-02-15 08:00:14 +01:00
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -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());
}
}
+1 -1
View File
@@ -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'));
}