Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

YouTube

PHP Unit Testing with PHPUnit Tutorial

Gary Clarke via YouTube

Overview

Google, IBM & Meta Certificates – 40% Off
One Coursera Plus subscription covers most Professional Certificates on Coursera.
Unlock All Certificates
This tutorial teaches how to test PHP code with PHPUnit, covering test creation and execution, assertions, configuration, fixtures, exception testing, and mock objects.

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

Reviews

Start your review of PHP Unit Testing with PHPUnit Tutorial

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.