MCPcopy Create free account
hub / github.com/api-platform/website / testCreateGreeting

Method testCreateGreeting

api/tests/Api/GreetingsTest.php:9–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7class 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected