/** * 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()); }
/** * @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); }