public function testGetFeelingEntity()
 {
     $expected = ReturnValues::getFeelingResults();
     $return = $this->instance->getFeelingEntity($expected['feelings']['id']);
     $this->assertTrue($return instanceof Feeling);
     $this->assertEquals($expected['feelings']['energy'], $return->getEnergy());
 }
 public function testPutFeelingActionWithValidIdReturns200()
 {
     $client = self::createClient();
     $time = (new \DateTime())->format(\DateTime::COOKIE);
     $client->request('PUT', '/api/about-you/feeling/' . $this->getQuestionnaire()->getAboutYou()->getFeelings()->getId(), ReturnValues::getFeelingResults()['feelings'], array(), array('HTTP_Authorization' => 'APIAuth ' . $this->getUser()->getApiKey() . ':' . $this->createAuthenticationHash(array('content-type' => 'application/x-www-form-urlencoded', 'body' => '', 'resource' => '/api/about-you/feeling/' . $this->getQuestionnaire()->getAboutYou()->getFeelings()->getId(), 'timestamp' => $time)), 'HTTP_Date' => $time));
     $this->assertEquals(Response::HTTP_OK, $client->getResponse()->getStatusCode());
     $content = json_decode($client->getResponse()->getContent(), true);
     $this->assertNotEmpty($content['about_you']['feelings']['completed_date']);
     $this->assertArrayNotHasKey('rag_score', $content);
     $this->assertArrayNotHasKey('narrative', $content);
 }