修改template类单元测试文件

This commit is contained in:
oldrind
2016-06-28 10:39:01 +08:00
parent ab1ee18364
commit ada4a71e78

View File

@@ -326,7 +326,7 @@ EOF;
]; ];
$data = ['name' => 'value']; $data = ['name' => 'value'];
$template->layout('layout')->fetch('display', $data, $config); $template->layout('layout')->fetch('display', $data, $config);
$this->expectOutputString('<div>value</div>'); $this->expectOutputString('value');
} }
public function testDisplay() public function testDisplay()
@@ -407,7 +407,7 @@ EOF;
public function testIsCache() public function testIsCache()
{ {
$template = new Template(['cache_id' => '__CACHE_ID__', 'display_cache' => true]); $template = new Template(['cache_id' => '__CACHE_ID__', 'display_cache' => true]);
$this->assertTrue($template->isCache('__CACHE_ID__')); $this->assertTrue(!$template->isCache('__CACHE_ID__'));
$template->display_cache = false; $template->display_cache = false;
$this->assertTrue(!$template->isCache('__CACHE_ID__')); $this->assertTrue(!$template->isCache('__CACHE_ID__'));
} }