class Twig_Tests_Node_Expression_ParentTest

Hierarchy

Expanded class hierarchy of Twig_Tests_Node_Expression_ParentTest

File

drupal/core/vendor/twig/twig/test/Twig/Tests/Node/Expression/ParentTest.php, line 14

View source
class Twig_Tests_Node_Expression_ParentTest extends Twig_Tests_Node_TestCase {

  /**
   * @covers Twig_Node_Expression_Parent::__construct
   */
  public function testConstructor() {
    $node = new Twig_Node_Expression_Parent('foo', 0);
    $this
      ->assertEquals('foo', $node
      ->getAttribute('name'));
  }

  /**
   * @covers Twig_Node_Expression_Parent::compile
   * @dataProvider getTests
   */
  public function testCompile($node, $source, $environment = null) {
    parent::testCompile($node, $source, $environment);
  }
  public function getTests() {
    $tests = array();
    $tests[] = array(
      new Twig_Node_Expression_Parent('foo', 0),
      '$this->renderParentBlock("foo", $context, $blocks)',
    );
    return $tests;
  }

}

Members