private function checkChosenProperty(ProfessionLevel $professionLevel, ExceptionalityFate $fate, BaseProperty $chosenProperty) { if ($chosenProperty->getValue() > $fate->getUpToSingleProperty()) { throw new Exceptions\InvalidValueOfChosenProperty("Requested {$chosenProperty->getCode()} value {$chosenProperty->getValue()} is higher than allowed" . " maximum {$fate->getUpToSingleProperty()} for profession {$professionLevel->getProfession()->getValue()}" . " and fate {$fate::getCode()}"); } }
/** * @param ExceptionalityFate $fate * @test * @depends I_can_create_it_by_self */ public function I_can_get_up_to_single_property_limit(ExceptionalityFate $fate) { self::assertSame($this->getExpectedUpToSingleProperty(), $fate->getUpToSingleProperty()); }