Level 37
Have you installed the pestphp/pest-plugin-laravel package?
Route::get('/welcome', function () {
return view('welcome');
})->name('welcome');
ref: https://pestphp.com/docs/higher-order-testing
i run php artisan test --parallel --group=my
route('welcome') prevented the Test start to run and throw an error
here the ->group('my') is for the whole test file
<?php
uses()->group('my');
test('welcome page is ok', function () {
$this
->get('/welcome')
->assertOk();
});
test('welcome route is ok')
->get(route('welcome')) // <--- ERROR Target class [url] does not exist.
->assertOk();
when i change to static path, all Test passed
test('welcome route is ok')
->get('/welcome')
->assertOk();
so how can use Laravel build-in helpers in the Pest Test?
Please or to participate in this conversation.