Skip to content

amirgee007/laravel-unit-testing-assignment

Repository files navigation

Mini Project 2nd

In this project you need to create a NEW Laravel site and complete the following, Test Setup Instructions are here.

  1. Configure a new Laravel website from laravel directory.
  2. Generate the default laravel authentication login register etc.
  3. Create a db seed that inserts 50 users in the cars table
  4. Create a new model named car and add 3 properties to it: Make, Model, and year as well as migration
  5. Create a factory for cars that sets the “make: field to either ford / honda / toyota
  6. Create a db seed to generate 50 cars.
  7. Create a controller, route, and view to show a contact form and add it to the main menu of main site.
  8. Create a controller, route, and view to show an about page and add it to the main menu of main site.

Unit tests - Each unit test uses an Assertion to check if it was done.

  1. Create a feature test that check the register page returns a 200 status code.
  2. Create a feature test to check if the login pages return a 200 status code.
  3. Create a feature test to check if you’re about page returns a 200 status code.
  4. Create a feature test to check if your contact page returns a 200 status code.
  5. Write a unit test to insert a user into the users table.
  6. Write a unit test to update the name of a user in the db to Steve Smith.
  7. Write a unit test to delete a user in the db.
  8. Write a unit test to count the number of records inserted by the db seed. i.e. $userCount = 50
  9. Write a unit test to test inserting a car into table.
  10. Write a unit test to test updating a car year to 2000.
  11. Write a unit test to test deleting a car record.
  12. Write a unit test to test to count the records inserted by the db seed. i.e. $carCount = 50
  13. Write a unit test to check if a car's year field is an integer.
  14. Write a unit test to check if a car's make is either ford / honda / toyota.
  15. Write a unit tests to check that the model field in cars table is a string.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published