Writing and Refactoring Testable PHP
Offered By: LinkedIn Learning
Course Description
Overview
Save Big on Coursera Plus. 7,000+ courses at $160 off. Limited Time Only!
Discover how to leverage test-driven development (TDD) in new PHP projects and refactor code in existing projects.
Syllabus
Introduction
- Test-driven development and refactoring in PHP
- Concepts and technologies you should know
- Using GitHub Codespaces with this course
- Automated testing
- Define types of testing
- What is refactoring?
- When to refactor
- Configure a project for tests
- Write an acceptance test
- Write a failing unit test, make the test pass, refactor
- Write testable code
- Large chunks of logic
- Incorrect OOP logic
- Change lots of files for one feature
- Unnecessary code
- Strong coupling
- Using mocks
- Files that are modified often
- Identifying the best place to start
- Add one passing test
- Identify a brittle function and add tests
- Extract functionality (using TDD)
- Simplify conditionals
- Simplify function signatures
- Identify objects from related functions
- Replace arrays with objects
- Add value objects (easy to test)
- Add null objects
- Replace conditionals with interfaced classes
- Make steady progress
- Prevent regressions
- Cleaner code
- Decoupled code
- Become a better developer
- On a spaghetti-code project
- With a looming deadline
- With a team that doesn't understand TDD and refactoring
- With a PM that doesn’t understand TDD and refactoring
- Next steps
Taught by
Gary Kovar
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