/** * @test * @covers PHPSC\Conference\Domain\Service\RegistrationCostCalculator::__construct * @covers PHPSC\Conference\Domain\Service\RegistrationCostCalculator::getBaseCost * @covers PHPSC\Conference\Domain\Service\RegistrationCostCalculator::getVariation */ public function getBaseCostShouldReturnTheCostOfBothDaysWhenIsRegularRegistrationPeriod() { $this->event->expects($this->any())->method('hasAttendeeRegistration')->willReturn(true); $this->event->expects($this->any())->method('isLateRegistrationPeriod')->willReturn(false); $this->talkManager->expects($this->any())->method('eventHasAnyApprovedTalk')->willReturn(true); $this->assertEquals(100, $this->calculator->getBaseCost($this->event, $this->user, new DateTime(), false)); }
/** * @return number */ public function getCost($talksOnly) { return $this->costCalculator->getBaseCost($this->event, $this->user, new DateTime(), $talksOnly); }