【发布时间】:2015-05-02 06:04:32
【问题描述】:
我正在 Laravel 5 中开发一个应用程序,我有一个从 TestCase.php 扩展的测试文件,我需要在我的文件中调用 phpcs 命令
class MyTest extends TestCase {
public function testFunction()
{
//here I need to call the phpcs command
}
}
在这里的示例http://laravel.com/docs/5.0/testing 我刚刚找到了this->call 函数,我认为这对我来说不是正确的选择,因为它返回一个response 对象,正确的方法是什么?我应该使用哪个类和函数在这个类中运行命令行我还需要将命令的结果放在一个变量中
【问题讨论】:
标签: unit-testing command-line laravel-5 laravel-testing