public function Twig_Tests_Node_BlockTest::testConstructor

@covers Twig_Node_Block::__construct

File

drupal/core/vendor/twig/twig/test/Twig/Tests/Node/BlockTest.php, line 19

Class

Twig_Tests_Node_BlockTest

Code

public function testConstructor() {
  $body = new Twig_Node_Text('foo', 0);
  $node = new Twig_Node_Block('foo', $body, 0);
  $this
    ->assertEquals($body, $node
    ->getNode('body'));
  $this
    ->assertEquals('foo', $node
    ->getAttribute('name'));
}