Great news, I found this article https://laravel-news.com/how-to-start-testing that explains simple steps for everyone who wants to enter the world of Testing in Laravel by PHPUnit and PEST and delve deeper into it, and this article will only put you on the first path and I will not talk much about the importance of Testing.
- PEST: New Popular Alternative to PHPUnit
namespace Tests\Feature;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
class ExampleTest extends TestCase
{
public function test_the_application_returns_a_successful_response()
{
$response = $this->get('/');
$response->assertStatus(200);
}
}
Do you know how the same test would look with PEST
test('the application returns a successful response')->get('/')->assertStatus(200);
I hope you enjoyed with me and to learn more about this release visit the sources and search more. I adore you who search for everything new.
Top comments (1)
are there a command to execute only a specific test file? pleace