removed usage of assertInstanceOf as if is not available when using PHPUnit on PHP 5.2.*

This commit is contained in:
Fabien Potencier
2012-02-06 18:16:12 +01:00
parent 5dd0aaec16
commit 4478816e41
2 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -31,7 +31,7 @@ class Twig_Tests_Node_ForTest extends Twig_Tests_Node_TestCase
$this->assertEquals($valueTarget, $node->getNode('value_target'));
$this->assertEquals($seq, $node->getNode('seq'));
$this->assertTrue($node->getAttribute('ifexpr'));
$this->assertInstanceOf('Twig_Node_If', $node->getNode('body'));
$this->assertEquals('Twig_Node_If', get_class($node->getNode('body')));
$this->assertEquals($body, $node->getNode('body')->getNode('tests')->getNode(1)->getNode(0));
$this->assertEquals(null, $node->getNode('else'));
@@ -19,7 +19,7 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends PHPUnit_Framework_TestCase
$node = $stream->getNode('body')->getNode(0);
$this->assertInstanceOf('Twig_Node_Expression_BlockReference', $node);
$this->assertEquals('Twig_Node_Expression_BlockReference', get_class($node));
$this->assertTrue($node->getAttribute('output'));
}
@@ -32,7 +32,7 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends PHPUnit_Framework_TestCase
$node = $stream->getNode('blocks')->getNode('content')->getNode(0)->getNode('body');
$this->assertInstanceOf('Twig_Node_Expression_Parent', $node);
$this->assertEquals('Twig_Node_Expression_Parent', get_class($node));
$this->assertTrue($node->getAttribute('output'));
}
@@ -48,7 +48,7 @@ class Twig_Tests_NodeVisitor_OptimizerTest extends PHPUnit_Framework_TestCase
$node = $stream->getNode('body')->getNode(0)->getNode(1);
$this->assertInstanceOf('Twig_Node_Expression_BlockReference', $node);
$this->assertEquals('Twig_Node_Expression_BlockReference', get_class($node));
$this->assertTrue($node->getAttribute('output'));
}