We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a0106f6 commit 656c320Copy full SHA for 656c320
allow.md
@@ -154,7 +154,9 @@ it("shows some examples of function stubbing", function() {
154
// Monkey patch `PDO` with a specific class.
155
allow('PDO')->toBe('My\Alternative\PDO');
156
157
- // Monkey patch `DateTime` with a specific instance (PHP>=7 only).
+ // Monkey patch `DateTime` with a specific instance
158
+ // WARNING: instance substitution doesn't work by reference.
159
+ // Ex: `$date =& $obj->myDate()`, the date won't be substited here.
160
allow('DateTime')->toBe(new DateTime('@123'));
161
162
// Monkey patch `PDO` with a generic stub instance.
0 commit comments