loginAs($this->user); $this->assertResponseIsSuccessful(); $enumName = 'function'; $this->get("/api/enum/$enumName"); $this->assertResponseStatusCodeSame(Response::HTTP_OK); $this->assertResponseIsSuccessful(); } public function testGetEnumNotFound() { $this->loginAs($this->user); $this->assertResponseIsSuccessful(); $enumName = 'notfound'; $this->get("/api/enum/$enumName"); $this->assertResponseStatusCodeSame(Response::HTTP_NOT_FOUND); } public function testGetCategoryEnum() { $this->loginAs($this->user); $this->assertResponseIsSuccessful(); $this->get('/api/enum/organization_category'); $this->assertResponseStatusCodeSame(Response::HTTP_OK); $this->assertResponseIsSuccessful(); $this->assertJsonContains([ '@context' => '/api/contexts/Enum', '@id' => '/api/enum/organization_category', '@type' => 'Enum', 'name' => 'organization_category', 'items' => [ "PROFESSIONAL" => "PROFESSIONAL", "ARTISTIC_ENSEMBLE" => "ARTISTIC_ENSEMBLE", "SCHOOL_OF_ARTS" => "SCHOOL_OF_ARTS", "NETWORK" => "NETWORK", "ORGANIZER" => "ORGANIZER", "PERSON" => "PERSON", "OTHER" => "OTHER" ] ]); } }