Skip to content

Commit

Permalink
tests: updated for last Latte
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Nov 16, 2020
1 parent 3d063c9 commit 1d4e43e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"require-dev": {
"nette/tester": "^2.0",
"nette/di": "^v3.0",
"latte/latte": "^2.4",
"latte/latte": "^2.9",
"tracy/tracy": "^2.4",
"phpstan/phpstan": "^0.12"
},
Expand Down
6 changes: 3 additions & 3 deletions tests/Bridges.Latte/expected/CacheMacro.cache.inc.phtml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
%A%
if (Nette\Bridges\CacheLatte\CacheMacro::createCache($this->global->cacheStorage, '%[\w]+%', $this->global->cacheStack)) {
?> <?php echo %a% ?>

<?php
echo ' ';
echo LR\Filters::escapeHtmlText(($this->filters->lower)($title)) /* line 4 */;
echo "\n";
Nette\Bridges\CacheLatte\CacheMacro::endCache($this->global->cacheStack);
}
%A%
21 changes: 10 additions & 11 deletions tests/Bridges.Latte/expected/CacheMacro.cache.phtml
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
<?php
%A%
Noncached content
echo 'Noncached content
%A%
';
if (Nette\Bridges\CacheLatte\CacheMacro::createCache($this->global->cacheStorage, '%[\w]+%', $this->global->cacheStack, [$id, 'tags' => 'mytag'])) {
?>

<h1><?php echo %a% ?></h1>
echo '
<h1>';
echo LR\Filters::escapeHtmlText(($this->filters->upper)($title)) /* line 5 */;
echo '</h1>
<?php
';
/* line 7 */
$this->createTemplate('include.cache.latte', %a%)->renderToContentType('html');
?>

<?php
$this->createTemplate('include.cache.latte', ['localvar' => 11] + $this->params, "include")->renderToContentType('html');
echo "\n";
Nette\Bridges\CacheLatte\CacheMacro::endCache($this->global->cacheStack, [$id, 'tags' => 'mytag']);
}
%A%
}


%a?%function prepare()%a?%
public function prepare(): void
{
%A%
Nette\Bridges\CacheLatte\CacheMacro::initRuntime($this);
Expand Down

0 comments on commit 1d4e43e

Please sign in to comment.