TESTC1 | Write your first unit tests with PHPUnit
- This half-day course lets learners know what, when and how to test PHP code.
PrerequisitesPersonal skills: Good command of PHP, and its IDE (PHPStorm preferences). Techniques: PHP up to date (7.2.5 minimum), Composer.
GoalsThanks to the flagship features of PHPUnit, the learner will be able to obtain complete code coverage, through classes and test scenarios, according to specific standards and good practices.
- Context and definitions
- for or against
- What to test, when to test?
Writing unit tests with PHPUnit
- Installation of the PHPUnit test framework
- Write your first class of unit test scenarios according to standards
- Test dependencies
- Test exceptions
- Use data providers
- Calculate your coverage code
- Use CLI options
- Fixtures and database tests
- Create your own assertions
We also recommend the following courses
1 upcoming session
You are not available at this periods? We organize tailored training courses: contact us for more informations!