PHP: Test-Driven Development with PHPUnit
1h 55mIntermediate2016-11-03
Authors

Justin Yost
Web Developer, Programmer
Course details
Develop better software with less bugs, and save more time for developing new features, with test-driven development. This course takes developers from writing their first unit test in PHPUnit to improving code coverage in their applications. Justin Yost covers writing test doubles to deal with dependencies in software, writing exception-based tests, and rapidly adding test cases to the core suite of unit tests. Developers will come away with a basic understanding of the test-driven development (TDD) cycle and understand how to use unit tests to write code, as well as refactor legacy code.
Learning objectives
Why use unit testing?
Writing unit tests
Extending unit tests
Filtering PHPUnit tests
Building dummy objects
Working with data providers
Writing an exception-based test
Using TDD tactics
Using PHPUnit advanced tactics, such as database tests
Learning objectives
Why use unit testing?
Writing unit tests
Extending unit tests
Filtering PHPUnit tests
Building dummy objects
Working with data providers
Writing an exception-based test
Using TDD tactics
Using PHPUnit advanced tactics, such as database tests
Skills covered
PHPProgramming LanguagesOpen SourceSoftware DevelopmentDeep Dive (X:Y)
Concepts
0. Introduction
- 01 - Welcome
- 02 - What you should know
- 03 - How to use the exercise files
1. The Basics of Test-Driven Development
- 04 - What is unit testing
- 05 - Why use unit testing
- 06 - Automated vs. manual testing
- 07 - Install PHPUnit
- 08 - Write a unit test
- 09 - Extend a unit test
- 10 - Write a test-driven development method
- 11 - Filter PHPUnit tests
2. Advanced Test-Driven Development
- 12 - Test doubles overview
- 13 - Build a dummy object
- 14 - Build a test stub
- 15 - Test mock
- 16 - Data providers
- 17 - Advanced data providers
- 18 - Write an exception-based test
3. Test-Driven Development Tactics
- 19 - The test-driven development cycle
- 20 - Advantages of TDD
- 21 - Refactor with TDD
- 22 - Decouple code with TDD
4. PHPUnit Advanced Tactics
- 23 - Code coverage basics
- 24 - Advanced code coverage
- 25 - Database tests
Conclusion
- 26 - Next steps