/** * @return array */ protected function getExpectedDataHeaderNamesToTypes() { $professionsWithSkillTypes = []; foreach (ProfessionCode::getPossibleValues() as $professionCode) { foreach (SkillTypeCode::getPossibleValues() as $skillTypeCode) { $professionsWithSkillTypes["{$professionCode} {$skillTypeCode}"] = self::INTEGER; } } return $professionsWithSkillTypes; }
public function provideSkillPointToProfession() { $combinations = []; $rowIndex = 0; for ($backgroundSkillPoint = 0; $backgroundSkillPoint <= 8; $backgroundSkillPoint++) { $columnIndex = 0; foreach (ProfessionCode::getPossibleValues() as $professionCode) { foreach (SkillTypeCode::getPossibleValues() as $skillTypeCode) { $combinations[] = [$backgroundSkillPoint, $professionCode, $skillTypeCode, $this->getExpectedSkillPoints($rowIndex, $columnIndex)]; $columnIndex++; } } $rowIndex++; } return $combinations; }
/** * @test */ public function I_can_get_all_codes_at_once_or_by_same_named_constant() { self::assertEquals(['physical', 'psychical', 'combined'], SkillTypeCode::getPossibleValues()); }