From 62a27d9ca6f410daf73d911d5c8e90c6163edb82 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Tue, 17 May 2016 21:59:20 +0200 Subject: [PATCH] tests: compatibility with Latte master --- src/Bridges/CacheLatte/CacheMacro.php | 4 ++-- tests/Bridges.Latte/expected/CacheMacro.cache.phtml | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/Bridges/CacheLatte/CacheMacro.php b/src/Bridges/CacheLatte/CacheMacro.php index 72407d11..273303df 100644 --- a/src/Bridges/CacheLatte/CacheMacro.php +++ b/src/Bridges/CacheLatte/CacheMacro.php @@ -52,10 +52,10 @@ public function finalize() public function nodeOpened(Latte\MacroNode $node) { if ($node->modifiers) { - throw new Latte\CompileException("Modifiers are not allowed in {{$node->name}}"); + throw new Latte\CompileException('Modifiers are not allowed in ' . $node->getNotation()); } $this->used = TRUE; - $node->isEmpty = FALSE; + $node->empty = FALSE; $node->openingCode = Latte\PhpWriter::using($node) ->write('global->cacheStorage, %var, $this->global->cacheStack, %node.array?)) { ?>', Nette\Utils\Random::generate() diff --git a/tests/Bridges.Latte/expected/CacheMacro.cache.phtml b/tests/Bridges.Latte/expected/CacheMacro.cache.phtml index 0996cd6e..3e2d2506 100644 --- a/tests/Bridges.Latte/expected/CacheMacro.cache.phtml +++ b/tests/Bridges.Latte/expected/CacheMacro.cache.phtml @@ -15,11 +15,14 @@ Noncached content %A% if (Nette\Bridges\CacheLatte\CacheMacro::createCache($this->global->cacheStorage, '%[\w]+%', $this->global->cacheStack, [$id, 'tags' => 'mytag'])) { - ?> +?>

-createTemplate('include.cache.latte', ['localvar' => 11] + $this->params, "include")->renderToContentType('html') ?> +createTemplate('include.cache.latte', ['localvar' => 11] + $this->params, "include")->renderToContentType('html'); +?> global->cacheStack);