Unlimited Plugins, WordPress themes, videos & courses! Unlimited asset downloads! From $16.50/m
by
Lessons:12Length:2.2 hours
  • 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.