Skip to content

Commit 444d164

Browse files
committed
Add a test for missing Content-Type header
Signed-off-by: takuyanakazawa <[email protected]>
1 parent e6d7ef5 commit 444d164

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/Serializers/SmartSerializerTest.php

+10
Original file line numberDiff line numberDiff line change
@@ -87,4 +87,14 @@ public function testDeserializeNonJsonData(): void
8787

8888
$this->assertEquals('plain text data', $result);
8989
}
90+
91+
public function testDeserializeWithNoContentTypeHeader(): void
92+
{
93+
$data = '{ "foo" : "bar" }';
94+
$headers = [];
95+
96+
$result = $this->serializer->deserialize($data, $headers);
97+
98+
$this->assertEquals('bar', $result['foo']);
99+
}
90100
}

0 commit comments

Comments
 (0)