/** * Sets the title 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 setTitleConstraint($query, $eventDemand, &$constraints) { if ($eventDemand->getTitle() !== '') { $constraints[] = $query->like('title', '%' . $eventDemand->getTitle() . '%', FALSE); } }
/** * @test */ public function getTitleReturnsGivenValueIfValueSet() { $this->subject->setTitle('test title'); $this->assertEquals('test title', $this->subject->getTitle()); }