コード例 #1
0
 /**
  * @test
  * @expectedException \DrdPlus\Professions\Exceptions\ProfessionNotFound
  */
 public function I_can_not_create_profession_by_unknown_code()
 {
     /** @var ProfessionCode|\Mockery\MockInterface $professionCode */
     $professionCode = $this->mockery(ProfessionCode::class);
     $professionCode->shouldReceive('getValue')->andReturn('muralist');
     Profession::getItByCode($professionCode);
 }
コード例 #2
0
 /**
  * @return Thief|Profession
  */
 public static function getIt()
 {
     return parent::getIt();
 }
コード例 #3
0
 /**
  * @param Profession $profession
  * @param string $skillType
  * @param Tables $tables
  * @return int
  */
 public function getSkillPoints(Profession $profession, $skillType, Tables $tables)
 {
     return $tables->getBackgroundSkillsTable()->getSkillPoints($this->getSpentBackgroundPoints(), $profession->getValue(), $skillType);
 }
コード例 #4
0
 protected static function isProfessionPrimaryProperty(Profession $profession, $propertyCode)
 {
     return $profession->isPrimaryProperty($propertyCode);
 }