update scope tests for {include}

This commit is contained in:
uwetews
2016-01-02 02:12:31 +01:00
parent bac6e3c069
commit 978d7c88c5

View File

@@ -182,7 +182,7 @@ class CompileIncludeTest extends PHPUnit_Smarty
{ {
$this->smarty->setMergeCompiledIncludes($merge); $this->smarty->setMergeCompiledIncludes($merge);
$this->smarty->assign('foo', 1); $this->smarty->assign('foo', 1);
$tpl = $this->smarty->createTemplate('test_include_parent_scope.tpl', null, null, $this->smarty); $tpl = $this->smarty->createTemplate('test_include_parent_scope.tpl', null, null, $this->smarty, false);
$content = $this->smarty->fetch($tpl); $content = $this->smarty->fetch($tpl);
$content2 = $this->smarty->fetch('eval: root value {$foo}'); $content2 = $this->smarty->fetch('eval: root value {$foo}');
$this->assertContains('before include 1', $content, 'before include 1 ' . $text); $this->assertContains('before include 1', $content, 'before include 1 ' . $text);
@@ -224,7 +224,7 @@ class CompileIncludeTest extends PHPUnit_Smarty
$content2 = $this->smarty->fetch('eval: smarty value {$foo}'); $content2 = $this->smarty->fetch('eval: smarty value {$foo}');
$this->assertContains('before include 1', $content, 'before include 1 ' . $text); $this->assertContains('before include 1', $content, 'before include 1 ' . $text);
$this->assertContains('in include 2', $content . 'in include 2 ' . $text); $this->assertContains('in include 2', $content . 'in include 2 ' . $text);
$this->assertContains('after include 1', $content, 'after include 1 ' . $text); $this->assertContains('after include 2', $content, 'after include 1 ' . $text);
$this->assertContains('smarty value 2', $content2, 'smarty value 2 ' . $text); $this->assertContains('smarty value 2', $content2, 'smarty value 2 ' . $text);
} }