$node = new Twig_Node_AutoEscape(true, $body, 1);
$this->assertEquals($body, $node->getNode('body'));
- $this->assertEquals(true, $node->getAttribute('value'));
+ $this->assertTrue($node->getAttribute('value'));
}
/**
$this->assertTrue($node->getAttribute('ifexpr'));
$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'));
+ $this->assertNull($node->getNode('else'));
$else = new Twig_Node_Print(new Twig_Node_Expression_Name('foo', 1), 1);
$node = new Twig_Node_For($keyTarget, $valueTarget, $seq, $ifexpr, $body, $else, 1);
$node = new Twig_Node_If($t, $else, 1);
$this->assertEquals($t, $node->getNode('tests'));
- $this->assertEquals(null, $node->getNode('else'));
+ $this->assertNull($node->getNode('else'));
$else = new Twig_Node_Print(new Twig_Node_Expression_Name('bar', 1), 1);
$node = new Twig_Node_If($t, $else, 1);
$expr = new Twig_Node_Expression_Constant('foo.twig', 1);
$node = new Twig_Node_Include($expr, null, false, false, 1);
- $this->assertEquals(null, $node->getNode('variables'));
+ $this->assertNull($node->getNode('variables'));
$this->assertEquals($expr, $node->getNode('expr'));
$this->assertFalse($node->getAttribute('only'));
$this->assertEquals($names, $node->getNode('names'));
$this->assertEquals($values, $node->getNode('values'));
- $this->assertEquals(false, $node->getAttribute('capture'));
+ $this->assertFalse($node->getAttribute('capture'));
}
/**
new Twig_Token(Twig_Token::EOF_TYPE, '', 1),
)));
- $this->assertEquals(null, $parser->getParent());
+ $this->assertNull($parser->getParent());
}
// The getVarName() must not depend on the template loaders,
$object = new Twig_TemplateMagicMethodExceptionObject();
- $this->assertEquals(null, $template->getAttribute($object, 'foo'));
+ $this->assertNull($template->getAttribute($object, 'foo'));
}
public function getGetAttributeTests()