コード例 #1
0
ファイル: DispatcherTest.php プロジェクト: CDRO/TYPO3.CMS
 /**
  * @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'));
 }
コード例 #2
0
ファイル: TestCaseTest.php プロジェクト: TrueType/phpunit
 /**
  * @test
  * @expectedException \InvalidArgumentException
  */
 public function setForEmptyPropertyNameInAccessibleMockObjectThrowsException()
 {
     $this->accessibleMock->_set('', '');
 }
コード例 #3
0
ファイル: ResponseTest.php プロジェクト: khanhdeux/typo3test
 /**
  * @test
  */
 public function __toStringReturnsActualContent()
 {
     $this->mockResponse->_set('content', 'foo');
     $this->assertSame('foo', (string) $this->mockResponse);
 }