/** * @test * @expectedException \TYPO3\CMS\Extbase\SignalSlot\Exception\InvalidSlotException */ public function dispatchThrowsInvalidSlotExceptionIfObjectManagerOfSignalSlotDispatcherIsNotSet() { $this->signalSlotDispatcher->_set('isInitialized', true); $this->signalSlotDispatcher->_set('objectManager', null); $this->signalSlotDispatcher->_set('slots', array('ClassA' => array('emitSomeSignal' => array(array())))); $this->assertSame(null, $this->signalSlotDispatcher->dispatch('ClassA', 'emitSomeSignal')); }
/** * @test * @expectedException \InvalidArgumentException */ public function setForEmptyPropertyNameInAccessibleMockObjectThrowsException() { $this->accessibleMock->_set('', ''); }
/** * @test */ public function __toStringReturnsActualContent() { $this->mockResponse->_set('content', 'foo'); $this->assertSame('foo', (string) $this->mockResponse); }