public function testWorkDoesNothingWithNegativeWorkRequest()
 {
     // Note that this had to have an active logged in character to not just get an ignored result of "0" gold.
     $this->char = TestAccountCreateAndDestroy::char();
     SessionFactory::getSession()->set('player_id', $this->char->id());
     $request = new Request([], ['worked' => -999]);
     RequestWrapper::inject($request);
     $work = new WorkController();
     $work_response = $work->requestWork();
     $earned_gold = $work_response['parts']['earned_gold'];
     $this->assertEquals("0", $earned_gold);
 }
 public function testWorkDoesNothingWithNegativeWorkRequest()
 {
     // Note that this had to have an active logged in character to not just get an ignored result of "0" gold.
     $this->char = TestAccountCreateAndDestroy::char();
     SessionFactory::getSession()->set('player_id', $this->char->id());
     $request = new Request([], ['worked' => -999]);
     RequestWrapper::inject($request);
     $work = new WorkController();
     $response = $work->requestWork($this->m_dependencies);
     $reflection = new \ReflectionProperty(get_class($response), 'data');
     $reflection->setAccessible(true);
     $response_data = $reflection->getValue($response);
     $earned_gold = $response_data['earned_gold'];
     $this->assertEquals("0", $earned_gold);
 }