【发布时间】:2015-01-20 22:04:01
【问题描述】:
我想测试我的一门课程,但看起来Phpunit 不起作用。
这是下面的测试:
<?php
use NERO\Datagrids\Datagrid;
class DatagridTest extends TestCase
{
public function __construct()
{
$this->datagrid = new Datagrid;
}
public function testStopMethod()
{
$response = $this->datagrid->stop();
$this->assertEquals($response, 'Stop');
}
}
还有课程本身:
<?php
namespace NERO\Datagrids;
class Datagrid {
public function stop()
{
return 'Stop';
}
}
我没有从命令行得到任何响应。我执行以下操作,但没有任何反应..
intelis:laravel me$ clear
intelis:laravel me$ vendor/bin/phpunit
intelis:laravel me$
感谢您的帮助!
【问题讨论】:
标签: php unit-testing laravel laravel-4 phpunit