mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Add widget directive for Template v2
This commit is contained in:
parent
3e052d2d00
commit
e192bc0ff6
3 changed files with 22 additions and 7 deletions
|
|
@ -1031,6 +1031,11 @@ class TemplateParserV2Test extends \Codeception\Test\Unit
|
|||
$source = "@url('', 'mid', \$mid, 'act', \$act])";
|
||||
$target = "<?php echo \$this->config->context === 'HTML' ? getUrl('', 'mid', \$__Context->mid, 'act', \$__Context->act]) : \$this->_v2_escape(getNotEncodedUrl('', 'mid', \$__Context->mid, 'act', \$__Context->act])); ?>";
|
||||
$this->assertEquals($target, $this->_parse($source));
|
||||
|
||||
// Widget
|
||||
$source = "@widget('login_info', ['skin' => 'default'])";
|
||||
$target = "<?php echo \WidgetController::getInstance()->execute('login_info', ['skin' => 'default']); ?>";
|
||||
$this->assertEquals($target, $this->_parse($source));
|
||||
}
|
||||
|
||||
public function testComments()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue