Giter Club home page Giter Club logo

laravel-unit-testing-assignment's Introduction

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.

laravel-unit-testing-assignment's People

Contributors

amirgee007 avatar

Stargazers

Reshad Memmedov avatar Yurij Finiv avatar Mohamed Hassan avatar

Watchers

James Cloos avatar  avatar

Forkers

dhartiblinkin

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.