Skip to content

Commit

Permalink
Add tests for new mixin nested variable propagation
Browse files Browse the repository at this point in the history
  • Loading branch information
kylekatarnls committed Jan 24, 2019
1 parent ae18154 commit b58eb07
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/Phug/RendererTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1085,6 +1085,24 @@ public function testMixinNestedScope()
]);

self::assertSame('<p>1</p><p>2</p><p>2</p>', $html);

$code = implode("\n", [
'- $text = "2"',
'mixin paragraph($text)',
' p= $text',
' block',
'+paragraph(\'1\')',
' +paragraph($text)',
'+paragraph($text)',
]);

$renderer = new Renderer([
'debug' => false,
]);

$html = $renderer->render($code);

self::assertSame('<p>1</p><p>2</p><p>2</p>', $html);
}

public function testConsecutiveRenders()
Expand Down

0 comments on commit b58eb07

Please sign in to comment.