An Interest In:
Web News this Week
- March 21, 2024
- March 20, 2024
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
- March 15, 2024
April 22, 2022 01:18 pm GMT
Original Link: https://dev.to/morcosgad/testing-in-laravel-2442
Testing in Laravel
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.
Original Link: https://dev.to/morcosgad/testing-in-laravel-2442
Share this article:
Tweet
View Full Article
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To