public function testGetInvocations(array $expected, $name, callable $invocations) { $spy = new Spy(__NAMESPACE__, $name); $spy->enable(); call_user_func($invocations); $this->assertEquals($expected, $spy->getInvocations()); }