Completed
A hard-coded dependency
Class Central Classrooms beta
YouTube videos curated by Class Central.
Classroom Contents
Testing Legacy Code - Safe Refactoring
Automatically move to the next video in the Classroom when playback concludes
- 1 Intro
- 2 What is legacy code?
- 3 What is refactoring?
- 4 What is unit testing?
- 5 Why would I unit test?
- 6 A solution
- 7 A better solution
- 8 PHPUnit - installation
- 9 Anatomy of a unit test
- 10 Running the tests
- 11 Mocking - Caution!
- 12 Mockery - Installation
- 13 Mockery - Usage
- 14 A method that echoes
- 15 A static method call
- 16 Testing: hard-coded dependencies
- 17 Refactoring hard-coded dependencies
- 18 A hard-coded dependency
- 19 Refactoring Redirections
- 20 Refactoring Exiting
- 21 Refactoring: Updating a file
- 22 Fake filesystem
- 23 Testing: Spaghetti Code
- 24 Private methods
- 25 Time for a recap...