mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-08 15:42:48 +08:00
修正单元测试
This commit is contained in:
@@ -314,7 +314,7 @@ EOF;
|
|||||||
$this->assertEquals($data, $content);
|
$this->assertEquals($data, $content);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testDisplay()
|
public function testFetch()
|
||||||
{
|
{
|
||||||
$template = new Template();
|
$template = new Template();
|
||||||
$template->assign('name', 'name');
|
$template->assign('name', 'name');
|
||||||
@@ -325,11 +325,11 @@ EOF;
|
|||||||
'display_cache' => true,
|
'display_cache' => true,
|
||||||
];
|
];
|
||||||
$data = ['name' => 'value'];
|
$data = ['name' => 'value'];
|
||||||
$template->layout('layout')->display('display', $data, $config);
|
$template->layout('layout')->fetch('display', $data, $config);
|
||||||
$this->expectOutputString('value');
|
$this->expectOutputString('value');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFetch()
|
public function testDisplay()
|
||||||
{
|
{
|
||||||
$config['view_path'] = dirname(__FILE__) . '/';
|
$config['view_path'] = dirname(__FILE__) . '/';
|
||||||
$config['view_suffix'] = '.html';
|
$config['view_suffix'] = '.html';
|
||||||
@@ -382,7 +382,7 @@ value:
|
|||||||
php code</div>
|
php code</div>
|
||||||
</nav>
|
</nav>
|
||||||
EOF;
|
EOF;
|
||||||
$template->fetch($content);
|
$template->display($content);
|
||||||
$this->expectOutputString($content2);
|
$this->expectOutputString($content2);
|
||||||
// $template->parse($content);
|
// $template->parse($content);
|
||||||
// var_dump($content);
|
// var_dump($content);
|
||||||
|
|||||||
Reference in New Issue
Block a user