7 days of WordPress plugins, themes & templates - for free!* Unlimited asset downloads! Start 7-Day Free Trial
FREELessons: 12Length: 2.2 hours

Next lesson playing in 5 seconds

  • Overview
  • Transcript

2.3 Realistic Controller Testing

Our real-world application usually consist of multiple layers (data access layers, service layers, and so on) and more often than not, our controllers rely upon these dependencies in order to perform their work. We'll use dependency injection (also known as passing arguments) in order to give our controller its dependency for testing purposes.