예제 #1
0
 /**
  * Test if minimumDate can be set
  *
  * @test
  * @return void
  */
 public function maximumDateCanBeSet()
 {
     $domainModelInstance = new Search();
     $value = '456';
     $domainModelInstance->setMaximumDate($value);
     $this->assertEquals($value, $domainModelInstance->getMaximumDate());
 }
예제 #2
0
 /**
  * @test
  * @expectedException \UnexpectedValueException
  */
 public function getSearchConstraintsThrowsErrorIfNoDateFieldForMaximumDateIsGiven()
 {
     $mockedQuery = $this->getMock('TYPO3\\CMS\\Extbase\\Persistence\\QueryInterface');
     $mockedRepository = $this->getAccessibleMock('GeorgRinger\\News\\Domain\\Repository\\NewsRepository', ['dummy'], [], '', FALSE);
     $search = new Search();
     $search->setMaximumDate('2014-04-01');
     $demand = new NewsDemand();
     $demand->setSearch($search);
     $mockedRepository->_call('getSearchConstraints', $mockedQuery, $demand);
 }