CRUD Feature Testing in Laravel 5

Create carousel feature test

PHPUnit 6.5.7 by Sebastian Bergmann and contributors.E                                                                   1 / 1 (100%)Time: 920 ms, Memory: 26.00MBThere was 1 error:1) Tests\Feature\Admin\Carousels\CarouselFeatureTest::it_can_show_the_create_carousel_page
InvalidArgumentException: Route [admin.carousel.create] not defined.
php artisan make:controller --resource Admin/Carousels/CarouselController
PHPUnit 6.5.7 by Sebastian Bergmann and contributors.F                                                                   1 / 1 (100%)Time: 987 ms, Memory: 28.00MBThere was 1 failure:1) Tests\Feature\Admin\Carousels\CarouselFeatureTest::it_can_show_the_create_carousel_page
Failed asserting that '' contains "Title".
➜  git: phpunit --filter=CarouselFeatureTest::it_can_show_the_create_carousel_page
PHPUnit 6.5.7 by Sebastian Bergmann and contributors.
. 1 / 1 (100%)Time: 810 ms, Memory: 28.00MBOK (1 test, 6 assertions)

Creating the actual carousel with post data

➜  git: phpunit --filter=CarouselFeatureTest::it_can_create_the_carousel          
PHPUnit 6.5.7 by Sebastian Bergmann and contributors.
. 1 / 1 (100%)Time: 993 ms, Memory: 28.00MBOK (1 test, 5 assertions)

--

--

Senior Fullstack Engineer, React Native developer and HL7 Health Informatics professional

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jeff Simons Decena

Senior Fullstack Engineer, React Native developer and HL7 Health Informatics professional