so i am using laravel's Example.test and i have the following code:
public function testBasicTest()
{
$this->get('/')
->type('some query', '#search')
->press('Search')
->see('Search results for "some query"')
->onPage('/search-results');
}
However, my node watch and execute script is telling me what is on the image bellow:
But according to https://laravel.com/docs/5.1/testing , this methods are supposed to exist. Is this because i am using laravel 5.5/5.4?
Those methods were removed in laravel 5.4 in favor of browser testing with Dusk.
However, from the 5.4 upgrade docs :
Laravel 5.4's testing layer has been re-written to be simpler and lighter out of the box. If you would like to continue using the testing layer present in Laravel 5.3, you may install the laravel/browser-kit-testing package into your application. This package provides full compatibility with the Laravel 5.3 testing layer. In fact, you can run the Laravel 5.4 testing layer side-by-side with the Laravel 5.3 testing layer.
The visit
stuff (and everything else that's browser-based) appears to require Laravel Dusk in 5.5.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.