コード例 #1
0
 /**
  * Sets the location 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 setLocationConstraint($query, $eventDemand, &$constraints)
 {
     if ($eventDemand->getLocation() !== NULL && $eventDemand->getLocation() != '') {
         $constraints[] = $query->equals('location', $eventDemand->getLocation());
     }
 }
コード例 #2
0
 /**
  * @test
  * @return void
  */
 public function getLocationReturnsExpectedLocation()
 {
     $location = new \DERHANSEN\SfEventMgt\Domain\Model\Location();
     $this->subject->setLocation($location);
     $this->assertSame($location, $this->subject->getLocation());
 }