diff --git a/tests/Response/StructuredResponseTest.php b/tests/Response/StructuredResponseTest.php index 942d1eb7..0f944811 100644 --- a/tests/Response/StructuredResponseTest.php +++ b/tests/Response/StructuredResponseTest.php @@ -15,9 +15,16 @@ final class StructuredResponseTest extends TestCase { #[Test] - public function getContent(): void + public function getContentWithArray(): void { - $response = new StructuredResponse(['data1', 'data2']); - self::assertSame(['data1', 'data2'], $response->getContent()); + $response = new StructuredResponse($expected = ['foo' => 'bar', 'baz' => ['qux']]); + self::assertSame($expected, $response->getContent()); + } + + #[Test] + public function getContentWithObject(): void + { + $response = new StructuredResponse($expected = (object) ['foo' => 'bar', 'baz' => ['qux']]); + self::assertSame($expected, $response->getContent()); } }