phpmock\spy\SpyTest::testGetInvocations PHP Method

testGetInvocations() public method

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