/** * Sets the location.country constraint to the given constraints array * * @param \TYPO3\CMS\Extbase\Persistence\QueryInterface $query Query * @param \DERHANSEN\SfEventMgt\Domain\Model\Dto\EventDemand $eventDemand EventDemand * @param array $constraints Constraints * * @return void */ protected function setLocationCountryConstraint($query, $eventDemand, &$constraints) { if ($eventDemand->getLocationCountry() !== NULL && $eventDemand->getLocationCountry() != '') { $constraints[] = $query->equals('location.country', $eventDemand->getLocationCountry()); } }
/** * Test if value can be set * * @test * @return void */ public function getLocationCountryReturnsExpectedValue() { $this->subject->setLocationCountry('Germany'); $this->assertSame('Germany', $this->subject->getLocationCountry()); }