コード例 #1
0
 /**
  * Sets the location.city 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 setLocationCityConstraint($query, $eventDemand, &$constraints)
 {
     if ($eventDemand->getLocationCity() !== NULL && $eventDemand->getLocationCity() != '') {
         $constraints[] = $query->equals('location.city', $eventDemand->getLocationCity());
     }
 }
コード例 #2
0
 /**
  * Test if value can be set
  *
  * @test
  * @return void
  */
 public function getLocationCityReturnsExpectedValue()
 {
     $this->subject->setLocationCity('Flensburg');
     $this->assertSame('Flensburg', $this->subject->getLocationCity());
 }