From 6c066f2981ab8d50b659273a0663b3924c91cb64 Mon Sep 17 00:00:00 2001 From: Takashi Kanemoto Date: Fri, 24 May 2024 16:58:09 +0900 Subject: [PATCH] =?UTF-8?q?test:=20=F0=9F=92=8D=20add=20tests?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/Model/ApiResourceTest.php | 41 +++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/Model/ApiResourceTest.php diff --git a/tests/Model/ApiResourceTest.php b/tests/Model/ApiResourceTest.php new file mode 100644 index 0000000000..c7193e4dc8 --- /dev/null +++ b/tests/Model/ApiResourceTest.php @@ -0,0 +1,41 @@ +SUT = new ApiResource('0640941', [ + new Address( + '01', + ja: new AddressUnit('北海道', '札幌市中央区', '旭ケ丘'), + en: new AddressUnit('Hokkaido', 'Chuo-ku, Sapporo-shi', 'Asahigaoka'), + ), + ]); + } + + public function testJsonSerialize(): void + { + $json = json_encode($this->SUT, flags: JSON_THROW_ON_ERROR); + $expected = <<SUT, $actual); + } +}