| 5 | use ApiPlatform\Symfony\Bundle\Test\ApiTestCase; |
| 6 | |
| 7 | class GreetingsTest extends ApiTestCase |
| 8 | { |
| 9 | public function testCreateGreeting(): void |
| 10 | { |
| 11 | static::createClient()->request('POST', '/greetings', ['json' => [ |
| 12 | 'name' => 'Kévin', |
| 13 | ]]); |
| 14 | |
| 15 | $this->assertResponseStatusCodeSame(201); |
| 16 | $this->assertJsonContains([ |
| 17 | '@context' => '/contexts/Greeting', |
| 18 | '@type' => 'Greeting', |
| 19 | 'name' => 'Kévin', |
| 20 | ]); |
| 21 | } |
| 22 | } |
nothing calls this directly
no outgoing calls
no test coverage detected