/** * @test */ public function connectAlsoAcceptsClosuresActingAsASlot() { $mockSignal = $this->getMock('ClassA', array('emitSomeSignal')); $mockSlot = function () { }; $this->signalSlotDispatcher->connect(get_class($mockSignal), 'emitSomeSignal', $mockSlot, 'foo', true); $expectedSlots = array(array('class' => null, 'method' => '__invoke', 'object' => $mockSlot, 'passSignalInformation' => true)); $this->assertSame($expectedSlots, $this->signalSlotDispatcher->getSlots(get_class($mockSignal), 'emitSomeSignal')); }