Writing and Refactoring Testable PHP
Offered By: LinkedIn Learning
Course Description
Overview
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
Desarrollo de aplicaciones profesionales para AndroidGalileo University via edX Engineering Maintainable Android Apps
Vanderbilt University via Coursera Técnicas Avançadas para Projeto de Software
Instituto Tecnológico de Aeronáutica via Coursera Accelerate Software Delivery using DevOps
Microsoft via edX Continuous Integration and Deployment
Udacity