request( 'POST', '/public/incoming-hook/calendar/msgraph/events/23', [], [], [], self::SAMPLE_BODY ); $this->assertResponseIsSuccessful(); $this->assertResponseStatusCodeSame(202); /** @var InMemoryTransport $transport */ $transport = self::$container->get('messenger.transport.async'); $this->assertCount(1, $transport->getSent()); } public function testValidateSubscription(): void { $client = self::createClient(); $client->request( 'POST', '/public/incoming-hook/calendar/msgraph/events/23?validationToken=something%20to%20decode' ); $this->assertResponseIsSuccessful(); $response = $client->getResponse(); $this->assertResponseHasHeader('Content-Type'); $this->assertStringContainsString('text/plain', $response->headers->get('Content-Type')); $this->assertEquals('something to decode', $response->getContent()); } }