Пример #1
0
 /**
  * @test
  */
 public function I_can_detect_if_is_empty()
 {
     $emptyName = Name::getEnum('');
     self::assertTrue($emptyName->isEmpty());
     $filledName = Name::getEnum('foo');
     self::assertFalse($filledName->isEmpty());
 }
Пример #2
0
 /**
  * @test
  */
 public function I_can_change_name()
 {
     $person = new Person($this->createRace(), $this->createGender(), $oldName = $this->createName(), $this->createExceptionality(), $this->createMemories(), $this->createProfessionLevels(), $this->createBackground(), $this->createSkills(), $this->createWeightInKgAdjustment(), $this->createHeightInCm(), $this->createAge(), new Tables());
     self::assertSame($oldName, $person->getName());
     NameType::registerSelf();
     $name = Name::getEnum($nameString = 'foo');
     self::assertNotSame($oldName, $name);
     $person->setName($name);
     self::assertSame($name, $person->getName());
     $person->setName($newName = Name::getEnum($newNameString = 'bar'));
     self::assertSame($newName, $person->getName());
 }
 private function createPersonEntity(Tables $tables, ExceptionalityPropertiesFactory $exceptionalityPropertiesFactory)
 {
     return new Person(CommonHuman::getIt(), Male::getIt(), Name::getIt('foo'), new Exceptionality(PlayerDecision::getIt(), $fate = FateOfGoodRear::getIt(), $exceptionalityPropertiesFactory->createChosenProperties($fate, $professionFirstLevel = ProfessionFirstLevel::createFirstLevel(Fighter::getIt()), 0, 1, 1, 0, 1, 0)), new Memories(), $professionLevels = new ProfessionLevels(ProfessionZeroLevel::createZeroLevel(Commoner::getIt()), $professionFirstLevel), $background = Background::createIt($fate, 4, 3, 5), Skills::createSkills($professionLevels, $background->getBackgroundSkillPoints(), new PhysicalSkills(ProfessionZeroLevel::createZeroLevel(Commoner::getIt())), new PsychicalSkills(ProfessionZeroLevel::createZeroLevel(Commoner::getIt())), new CombinedSkills(ProfessionZeroLevel::createZeroLevel(Commoner::getIt())), $tables), WeightInKg::getIt(123.45), HeightInCm::getIt(78.89), Age::getIt(56), $tables);
 }