/** * Tests invoking * @covers Copycat\Callback\Handler::invoke() */ public function testInvoke() { $handler = new Handler(array('foo' => new Collection(array(function () { return 'bar'; })))); $this->assertInternalType('array', $handler->invoke('foo')); $result = $handler->invoke('foo'); $this->assertEquals('bar', $result[0]); }