修正单元测试

This commit is contained in:
thinkphp
2016-04-24 14:39:50 +08:00
parent a5b242b2c2
commit ff46880ab4

View File

@@ -314,7 +314,7 @@ EOF;
$this->assertEquals($data, $content);
}
public function testDisplay()
public function testFetch()
{
$template = new Template();
$template->assign('name', 'name');
@@ -325,11 +325,11 @@ EOF;
'display_cache' => true,
];
$data = ['name' => 'value'];
$template->layout('layout')->display('display', $data, $config);
$template->layout('layout')->fetch('display', $data, $config);
$this->expectOutputString('value');
}
public function testFetch()
public function testDisplay()
{
$config['view_path'] = dirname(__FILE__) . '/';
$config['view_suffix'] = '.html';
@@ -382,7 +382,7 @@ value:
php code</div>
</nav>
EOF;
$template->fetch($content);
$template->display($content);
$this->expectOutputString($content2);
// $template->parse($content);
// var_dump($content);