/** * Sets the topEvent 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 setTopEventConstraint($query, $eventDemand, &$constraints) { if ($eventDemand->getTopEventRestriction() > 0) { $constraints[] = $query->equals('topEvent', (bool) ($eventDemand->getTopEventRestriction() - 1)); } }
/** * Test if value can be set * * @test * @return void */ public function getLocationCountryReturnsExpectedValue() { $this->subject->setLocationCountry('Germany'); $this->assertSame('Germany', $this->subject->getLocationCountry()); }