mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Implement template v2 feature of pushing to stack
This commit is contained in:
parent
7b518ab747
commit
c19d71847f
5 changed files with 95 additions and 8 deletions
|
|
@ -1038,6 +1038,19 @@ class TemplateParserV2Test extends \Codeception\Test\Unit
|
|||
$this->_normalizeWhitespace($executed_output)
|
||||
);
|
||||
|
||||
// Push stack
|
||||
$tmpl = new \Rhymix\Framework\Template('./tests/_data/template', 'v2pushstack.html');
|
||||
$tmpl->disableCache();
|
||||
|
||||
$executed_output = $tmpl->compile();
|
||||
//Rhymix\Framework\Storage::write(\RX_BASEDIR . 'tests/_data/template/v2pushstack.executed.html', $executed_output);
|
||||
$expected = file_get_contents(\RX_BASEDIR . 'tests/_data/template/v2pushstack.executed.html');
|
||||
$this->assertEquals(
|
||||
$this->_normalizeWhitespace($expected),
|
||||
$this->_normalizeWhitespace($executed_output)
|
||||
);
|
||||
$this->assertEquals(4, count($tmpl->getStack('cms')));
|
||||
|
||||
// Validation error check
|
||||
$tmpl = new \Rhymix\Framework\Template('./tests/_data/template', 'v2validation.html');
|
||||
$tmpl->disableCache();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue