Example #1
0
 public function testStealthDecreasesStrengthIncreasesStamina()
 {
     $pc = new Player();
     $str = $pc->getStrength();
     $stamina = $pc->getStamina();
     $speed = $pc->getSpeed();
     $pc->addStatus(STEALTH);
     $this->assertTrue($pc->hasStatus(STEALTH));
     $this->assertLessThan($str, $pc->getStrength(), 'Stealth failed to affect strength.');
     $this->assertGreaterThan($stamina, $pc->getStamina(), 'Stealth status failed to affect stamina.');
     $this->assertGreaterThan($speed, $pc->getSpeed(), 'Stealth status failed to affect speed.');
 }
 public function testShrineIndexPoisonedNotice()
 {
     $player = new Player();
     $player->level = 1;
     $player->health = $player->getMaxHealth();
     $player->addStatus(POISON);
     $this->m_dependencies['current_player'] = function ($c) use($player) {
         return $player;
     };
     $cont = new ShrineController();
     $response = $cont->index($this->m_dependencies);
     $reflection = new \ReflectionProperty(get_class($response), 'data');
     $reflection->setAccessible(true);
     $response_data = $reflection->getValue($response);
     $this->assertContains('form-cure', $response_data['pageParts']);
 }