コード例 #1
0
 /**
  * @return string
  */
 public static function getCode()
 {
     return parent::getCode();
 }
 private function checkChosenPropertiesSum($primaryPropertiesSum, $secondaryPropertiesSum, ExceptionalityFate $fate, ProfessionLevel $professionLevel)
 {
     if ($primaryPropertiesSum !== $fate->getPrimaryPropertiesBonusOnChoice()) {
         throw new Exceptions\InvalidSumOfChosenProperties("Expected sum of primary properties is {$fate->getPrimaryPropertiesBonusOnChoice()}, got {$primaryPropertiesSum}" . " for profession {$professionLevel->getProfession()->getValue()} and fate {$fate::getCode()}");
     }
     if ($secondaryPropertiesSum !== $fate->getSecondaryPropertiesBonusOnChoice()) {
         throw new Exceptions\InvalidSumOfChosenProperties("Expected sum of secondary properties is {$fate->getSecondaryPropertiesBonusOnChoice()}, got {$secondaryPropertiesSum}" . " for profession {$professionLevel->getProfession()->getValue()} and fate {$fate::getCode()}");
     }
 }
 public static function createBackgroundEntity()
 {
     return Background::createIt(ExceptionalityFate::getItByCode(FateOfCombination::getCode()), 3, 3, 4);
 }
コード例 #4
0
 /**
  * @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());
 }