Skip to content

Commit

Permalink
Added unit test for deprecated element and cell tags
Browse files Browse the repository at this point in the history
  • Loading branch information
othercorey committed Apr 4, 2020
1 parent 2870d65 commit d5ca93d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/TestCase/View/TwigViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,17 @@ public function testCellsShareTwig()
$this->assertSame($this->view->getTwig(), $cell->createView(AppView::class)->getTwig());
}

/**
* Tests deprecated element and cell tags render.
*
* @return void
*/
public function testDeprecatedTags()
{
$output = $this->view->render('deprecated_tags', false);
$this->assertSame("<b>10</b>\nblog_entry", $output);
}

/**
* Tests a twig file that throws internal exception throw a Twig exception with message.
*
Expand Down
3 changes: 3 additions & 0 deletions tests/test_app/templates/deprecated_tags.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{% cell 'Test' {'number': 10} {} %}

{% element 'blog_entry' {} {} %}

0 comments on commit d5ca93d

Please sign in to comment.