removed usage of assertInstanceOf as if is not available when using PHPUnit on PHP...
authorFabien Potencier <fabien.potencier@gmail.com>
Mon, 6 Feb 2012 17:16:12 +0000 (18:16 +0100)
committerFabien Potencier <fabien.potencier@gmail.com>
Mon, 6 Feb 2012 17:16:12 +0000 (18:16 +0100)
test/Twig/Tests/Node/ForTest.php
test/Twig/Tests/NodeVisitor/OptimizerTest.php

index f57d23a..ef3be82 100644 (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'));
 
index 94a4cfa..a55d98e 100644 (file)
@@ -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'));
     }