Skip to content

07Rinat07/Laravel-TDD-Crud-Rest-Api

Repository files navigation

Laravel-TDD-Crud-Rest-Api

Typing SVG

Project written on Laravel: Instructions and additional information for installing and testing the application:

  • composer install or composer update
  • Create a DB (in the .env file and the database, enter the correct data for configuration)
  • php artisan migrate

To run the project locally, you need to type commands in the terminal in turn ==>

  • php artisan serve

For tests:

  • cp .env .env.testing
  • php artisan make:test TicketTest --unit
  • php artisan migrate --seed --env=testing
  • php artisan migrate:refresh --seed --env=testing
  • composer dump-autoload
  • php artisan test

Additional actions in case of errors...

  • php artisan route:cache
  • php artisan route:clear
  • php artisan config:clear
  • php artisan cache:clear
  • php artisan optimize

Content. Themes.

  • Post test.
  • We pass the image in the test.
  • Post title validity test.
  • Image fidelity test.
  • Post update test.
  • Test on the posts index page and get all the posts.
  • Test on the posts page show and get one post.
  • Installing laravel breeze.
  • Test for deletion by a post-authorized user.
  • Test to delete a post only by an authorized user
  • Test for adding a post to the API.
  • Test for the validity of the post title in the API.
  • API Image Validity Test.
  • API post update test.
  • Attributes with date type in API testing.
  • Test to get a list of posts in the API
  • Test for getting one post in the API.
  • Test for deleting a post by an authorized user in the API.
  • Test to delete a post only by an authorized user in the API.
  • Unit Test example.

About

Basic Laravel TDD course. CRUD REST API with Laravel testing

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages