【发布时间】:2018-03-22 16:39:49
【问题描述】:
这是我编写的测试用例,当我尝试在 linux 上使用此命令 vendor/bin/phpunit 运行它时,它给了我错误“调用未定义的方法 Tests\Unit\ExampleTest::visit()”
namespace Tests\Unit;
use Tests\TestCase;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ExampleTest extends TestCase
{
/**
* A basic test example.
*
* @return void
*/
public function testBasicTest()
{
$this->visit('/Login')
->type('KP123@gmail.com','email')
->type('123456','password')
->press('Login')
->seePageIs('/home')
->see('Katy Perry');
}
}
我已尝试运行 composer update,但仍然无法正常工作。有没有人遇到过这个问题?
【问题讨论】: