/** * @test * @return void */ public function setEventForEventSetsEvent() { $event = new \DERHANSEN\SfEventMgt\Domain\Model\Event(); $this->subject->setEvent($event); $this->assertEquals($event, $this->subject->getEvent()); }
/** * @test * @return void */ public function getCurrentPriceReturnsPriceOptionIfSet() { $this->subject->setPrice(19.99); $priceOption1 = new PriceOption(); $priceOption1->setPrice(14.99); $priceOption1->setValidUntil(new \DateTime('today')); $priceOption2 = new PriceOption(); $priceOption2->setPrice(16.99); $priceOption2->setValidUntil(new \DateTime('tomorrow')); $this->subject->addPriceOptions($priceOption1); $this->subject->addPriceOptions($priceOption2); $this->assertEquals(14.99, $this->subject->getCurrentPrice()); }