Neos\Flow\Tests\Unit\SignalSlot\DispatcherTest::dispatchThrowsAnExceptionIfTheSpecifiedClassOfASlotIsUnknown PHP Метод

dispatchThrowsAnExceptionIfTheSpecifiedClassOfASlotIsUnknown() публичный Метод

    public function dispatchThrowsAnExceptionIfTheSpecifiedClassOfASlotIsUnknown()
    {
        $mockObjectManager = $this->createMock(ObjectManagerInterface::class);
        $mockObjectManager->expects($this->once())->method('isRegistered')->with('NonExistingClassName')->will($this->returnValue(false));
        $dispatcher = new Dispatcher();
        $dispatcher->injectObjectManager($mockObjectManager);
        $dispatcher->connect('Foo', 'bar', 'NonExistingClassName', 'slot', false);
        $dispatcher->dispatch('Foo', 'bar', []);
    }