public function testResurrectWhileAlive() { $this->char->level = ShrineController::FREE_RES_LEVEL_LIMIT; $this->char->turns = 0; $this->char->kills = 0; $this->char->save(); $cont = new ShrineController(); $response = $cont->resurrect($this->m_dependencies); $reflection = new \ReflectionProperty(get_class($response), 'data'); $reflection->setAccessible(true); $response_data = $reflection->getValue($response); $this->assertFalse(in_array('result-resurrect', $response_data['pageParts'])); }
public function testResurrectWhileAlive() { $this->char->vo->level = ShrineController::FREE_RES_LEVEL_LIMIT; $this->char->vo->turns = 0; $this->char->vo->kills = 0; $this->char->save(); $cont = new ShrineController(); $result = $cont->resurrect(); $final_char = Player::find($this->char->id()); $this->assertFalse(in_array('result-resurrect', $result['parts']['pageParts'])); }