修正测试文件

This commit is contained in:
thinkphp
2016-02-18 11:03:09 +08:00
parent 42f11800be
commit 8c1c58cc4e

View File

@@ -249,8 +249,8 @@ EOF;
public function testTag() public function testTag()
{ {
$config['tpl_path'] = dirname(__FILE__) . '/'; $config['view_path'] = dirname(__FILE__) . '/';
$config['tpl_suffix'] = '.html'; $config['view_suffix'] = '.html';
$template = new Template($config); $template = new Template($config);
$files = ['extend' => 'extend', 'include' => 'include']; $files = ['extend' => 'extend', 'include' => 'include'];
$template->assign('files', $files); $template->assign('files', $files);
@@ -351,7 +351,7 @@ EOF;
$template->assign('name', 'name'); $template->assign('name', 'name');
$config = [ $config = [
'strip_space' => true, 'strip_space' => true,
'tpl_path' => dirname(__FILE__) . '/', 'view_path' => dirname(__FILE__) . '/',
]; ];
$data = ['name' => 'value']; $data = ['name' => 'value'];
$template->display('display', $data, $config); $template->display('display', $data, $config);
@@ -361,7 +361,7 @@ EOF;
public function testFetch() public function testFetch()
{ {
$template = new Template(); $template = new Template();
$template->tpl_path = dirname(__FILE__) . '/'; $template->view_path = dirname(__FILE__) . '/';
$data = ['name' => 'value']; $data = ['name' => 'value'];
$content = <<<EOF $content = <<<EOF
{\$name} {\$name}