NilPortugues\Tests\Laravel5\JsonApi\JsonApiControllerTest::testPutActionWhenEmployeeDoesNotExistReturns404 PHP Метод

testPutActionWhenEmployeeDoesNotExistReturns404() публичный Метод

    public function testPutActionWhenEmployeeDoesNotExistReturns404()
    {
        //error need to be tested as production or exception will be thrown in debug mode.
        $this->app['config']->set('app.debug', false);
        $content = <<<JSON
{
  "data": {
    "type": "employee",
    "id": 1000,
    "attributes": {
          "company": "NilPortugues.com",
          "surname": "Portugués",
          "first_name": "Nil",
          "email_address": "nilportugues@localhost",
          "job_title": "Full Stack Web Developer",
          "business_phone": "(123)555-0100",
          "home_phone": "(123)555-0102",
          "mobile_phone": null,
          "fax_number": "(123)555-0103",
          "address": "Plaça Catalunya 1",
          "city": "Barcelona",
          "state_province": "Barcelona",
          "zip_postal_code": "08028",
          "country_region": "Spain",
          "web_page": "http://nilportugues.com",
          "notes": null,
          "attachments": null
       }
  }
}
JSON;
        $response = $this->call('PUT', 'http://localhost/employees/1000', json_decode($content, true), [], [], []);
        $this->assertEquals(404, $response->getStatusCode());
        $this->assertEquals('application/vnd.api+json', $response->headers->get('Content-type'));
    }