Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarStark committed Oct 5, 2024
1 parent db80745 commit 19586cd
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions tests/Response/StructuredResponseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

0 comments on commit 19586cd

Please sign in to comment.