Главная
Study mode:
on
1
Intro
2
Mike Lively
3
Example Class Under Test
4
Test Doubles
5
Example Test With Stubbing
6
Stub Behaviors
7
private Methods
8
Stubbing static Method Calls
9
final Methods
10
Stubbing final Method Calls
11
Magic Methods
12
Verifying Identical Invocations
13
Verifying No Interaction
14
PHPUnit Constraints
15
Wildcard Parameters
16
PHPUnit: Mocking
17
PHPUnit: Verifying Order
Description:
Explore mocking dependencies in unit tests using Phake in this PHP UK Conference talk. Delve into Test-Driven Development (TDD) principles and learn how to effectively mock dependencies in object-oriented programming. Discover the advantages of Phake over PHPUnit's built-in mocking API, including its more intuitive interface and expanded feature set. Follow along as the speaker demonstrates various mocking techniques, including stubbing behaviors, handling private and static methods, working with final methods and magic methods, verifying invocations, and utilizing PHPUnit constraints. Gain insights into creating more robust and maintainable unit tests for complex PHP applications.

Mocking Dependencies in Unit Tests with Phake

PHP UK Conference
Add to list