public function testUpdateHowAreYouFeelingReturns200()
 {
     $this->entityManager->shouldReceive('updateFeeling')->withAnyArgs()->andReturn(ReturnValues::getFeelingResultEntity());
     $return = $this->instance->updateHowAreYouFeeling(1, $this->paramFetcher);
     $this->assertEquals(RestfulService::STATUS_OK, $return->getStatusCode());
     $this->assertEquals(ReturnValues::getFeelingResultEntity(), $return->getData());
 }
 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);
 }