mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 23:02:48 +08:00
修正单元测试
This commit is contained in:
@@ -47,7 +47,7 @@ EOF;
|
|||||||
{/volist}
|
{/volist}
|
||||||
EOF;
|
EOF;
|
||||||
$data = <<<EOF
|
$data = <<<EOF
|
||||||
<?php if(is_array(\$list) || \$list instanceof \\think\\Collection): \$key = 0; \$__LIST__ = \$list;if( count(\$__LIST__)==0 ) : echo "" ;else: foreach(\$__LIST__ as \$key=>\$vo): \$mod = (\$key % 2 );++\$key;?>
|
<?php if(is_array(\$list) || \$list instanceof \\think\\Collection || \$list instanceof \\think\\Paginator): \$key = 0; \$__LIST__ = \$list;if( count(\$__LIST__)==0 ) : echo "" ;else: foreach(\$__LIST__ as \$key=>\$vo): \$mod = (\$key % 2 );++\$key;?>
|
||||||
|
|
||||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||||
EOF;
|
EOF;
|
||||||
@@ -88,7 +88,7 @@ EOF;
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
EOF;
|
EOF;
|
||||||
$data = <<<EOF
|
$data = <<<EOF
|
||||||
<?php if(is_array(\$list) || \$list instanceof \\think\\Collection): if( count(\$list)==0 ) : echo "empty" ;else: foreach(\$list as \$key=>\$val): ?>
|
<?php if(is_array(\$list) || \$list instanceof \\think\\Collection || \$list instanceof \\think\\Paginator): if( count(\$list)==0 ) : echo "empty" ;else: foreach(\$list as \$key=>\$val): ?>
|
||||||
|
|
||||||
<?php endforeach; endif; else: echo "empty" ;endif; ?>
|
<?php endforeach; endif; else: echo "empty" ;endif; ?>
|
||||||
EOF;
|
EOF;
|
||||||
@@ -389,7 +389,7 @@ default
|
|||||||
{/empty}
|
{/empty}
|
||||||
EOF;
|
EOF;
|
||||||
$data = <<<EOF
|
$data = <<<EOF
|
||||||
<?php if(empty(\$var) || (\$var instanceof \\think\\Collection && \$var->isEmpty())): ?>
|
<?php if(empty(\$var) || ((\$var instanceof \\think\\Collection || \$var instanceof \\think\\Paginator ) && \$var->isEmpty())): ?>
|
||||||
default
|
default
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
EOF;
|
EOF;
|
||||||
@@ -402,7 +402,7 @@ default
|
|||||||
{/notempty}
|
{/notempty}
|
||||||
EOF;
|
EOF;
|
||||||
$data = <<<EOF
|
$data = <<<EOF
|
||||||
<?php if(!(empty(\$var) || (\$var instanceof \\think\\Collection && \$var->isEmpty()))): ?>
|
<?php if(!(empty(\$var) || ((\$var instanceof \\think\\Collection || \$var instanceof \\think\\Paginator ) && \$var->isEmpty()))): ?>
|
||||||
default
|
default
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
EOF;
|
EOF;
|
||||||
@@ -538,13 +538,13 @@ EOF;
|
|||||||
public function testUrl()
|
public function testUrl()
|
||||||
{
|
{
|
||||||
$template = new template();
|
$template = new template();
|
||||||
$content = <<<EOF
|
$content = <<<EOF
|
||||||
{url link="Index/index" /}
|
{url link="Index/index" /}
|
||||||
EOF;
|
EOF;
|
||||||
$template->display($content);
|
$template->display($content);
|
||||||
$this->expectOutputString(\think\Url::build('Index/index'));
|
$this->expectOutputString(\think\Url::build('Index/index'));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testFunction()
|
public function testFunction()
|
||||||
{
|
{
|
||||||
$template = new template();
|
$template = new template();
|
||||||
|
|||||||
Reference in New Issue
Block a user