public function testHealAndResurrectOfDeadPlayer() { $this->char->death(); $this->char->save(); $cont = new ShrineController(); $result = $cont->healAndResurrect(); $final_char = Player::find($this->char->id()); $this->assertTrue(in_array('result-resurrect', $result['parts']['pageParts'])); $this->assertEquals($final_char->max_health(), $final_char->health()); }
public function testHealAndResurrectOfDeadPlayer() { $this->char->death(); $this->char->save(); $cont = new ShrineController(); $response = $cont->healAndResurrect($this->m_dependencies); $reflection = new \ReflectionProperty(get_class($response), 'data'); $reflection->setAccessible(true); $response_data = $reflection->getValue($response); $this->assertContains('result-resurrect', $response_data['pageParts']); $final_char = Player::find($this->char->id()); $this->assertEquals($final_char->getMaxHealth(), $final_char->health); }