Returns all slots which are connected with the given signal
/** * @test */ public function connectAlsoAcceptsClosuresActingAsASlot() { $mockSignal = $this->getMockBuilder('stdClass')->setMethods(['emitSomeSignal'])->getMock(); $mockSlot = function () { }; $dispatcher = new Dispatcher(); $dispatcher->connect(get_class($mockSignal), 'someSignal', $mockSlot, 'foo', false); $expectedSlots = [['class' => null, 'method' => '__invoke', 'object' => $mockSlot, 'passSignalInformation' => false]]; $this->assertSame($expectedSlots, $dispatcher->getSlots(get_class($mockSignal), 'someSignal')); }