PHP Unit Testing with PHPUnit Tutorial
Offered By: Gary Clarke via YouTube
Course Description
Overview
Master PHP unit testing with PHPUnit in this comprehensive tutorial. Learn essential techniques including setting up tests, making assertions, handling failures, and using color-coded feedback. Explore object and class testing, '@test' annotations, and filtering options for individual test runs. Configure PHPUnit using phpunit.xml, implement autoloading for test classes, and understand test scopes. Dive into setUp() and tearDown() methods, error and exception testing, and advanced concepts like test doubles, mock objects, and method mocking. Discover how to inject mock test dependencies, verify method call frequency, and organize tests into groups. Access source code on GitHub and enhance your PHP testing skills with practical examples and expert guidance.
Syllabus
Introduction / overview
Install PHPUnit
Create a test file
Run a test from the command line
Making assertions
Tests which fail
Using colors in test feedback
Testing objects and classes
Using the '@test' annotation
Using filter option to run individual tests
Configuring phpunit usng phpunit.xml
Autoloading classes in tests
Test scope
The setUp method
The tearDown method
Testing errors and exceptions
Test doubles
Creating mock objects
Mocking methods
Injecting mock test dependencies
Test number of times a method is expected to be called
Grouping tests
Taught by
Gary Clarke
Related Courses
A Practical Introduction to Test-Driven DevelopmentLearnQuest via Coursera Puppet Professional Certification - PPT206
A Cloud Guru Advanced Programming in Kotlin
Meta via Coursera البرمجة المتقدمة في Kotlin
Meta via Coursera Programación avanzada en Kotlin
Meta via Coursera