Пример #1
0
 /**
  * @test
  */
 public function copyEventRedirectsToRequestUrl()
 {
     /** @var tx_seminars_Mapper_Event|PHPUnit_Framework_MockObject_MockObject $mapper */
     $mapper = $this->getMock('tx_seminars_Mapper_Event', array('save'));
     Tx_Oelib_MapperRegistry::set('tx_seminars_Mapper_Event', $mapper);
     /** @var tx_seminars_Model_Event $event */
     $event = $mapper->getLoadedTestingModel(array());
     $className = $this->createAccessibleProxyClass();
     /** @var tx_seminars_FrontEnd_DefaultController $fixture */
     $fixture = new $className();
     $fixture->copyEvent($event);
     $currentUrl = t3lib_div::locationHeaderUrl(t3lib_div::getIndpEnv('REQUEST_URI'));
     self::assertSame('Location: ' . $currentUrl, $this->headerCollector->getLastAddedHeader());
 }
Пример #2
0
 /**
  * @test
  */
 public function addTwoHeadersAndGetTheLast()
 {
     $this->subject->addHeader('123: foo.');
     $this->subject->addHeader('123: bar.');
     self::assertSame('123: bar.', $this->subject->getLastAddedHeader());
 }
Пример #3
0
 /**
  * @test
  */
 public function existsSeminarMessageForInexistentUidSendsNotFoundHeader()
 {
     $this->fixture->existsSeminarMessage($this->testingFramework->getAutoIncrement('tx_seminars_seminars'));
     self::assertSame('Status: 404 Not Found', $this->headerCollector->getLastAddedHeader());
 }