assertInstanceOf(\RuntimeException::class, $e); $this->assertStringContainsString('invalid_client', $e->getMessage()); $this->assertStringContainsString('The client secret is incorrect.', $e->getMessage()); } public function test_graph_api_exception_formats_message(): void { $e = GraphApiException::fromResponse('ErrorItemNotFound', 'The specified object was not found.'); $this->assertInstanceOf(\RuntimeException::class, $e); $this->assertStringContainsString('ErrorItemNotFound', $e->getMessage()); $this->assertStringContainsString('The specified object was not found.', $e->getMessage()); } }