@@ -259,13 +259,13 @@ public function testEqualsConflictValues()
259259 */
260260 public function testJsonSerialize ()
261261 {
262- $ this ->assertJsonStringEqualsJsonString ('"foo" ' , json_encode (new EnumFixture (EnumFixture::FOO )));
263- $ this ->assertJsonStringEqualsJsonString ('"bar" ' , json_encode (new EnumFixture (EnumFixture::BAR )));
264- $ this ->assertJsonStringEqualsJsonString ('42 ' , json_encode (new EnumFixture (EnumFixture::NUMBER )));
265- $ this ->assertJsonStringEqualsJsonString ('0 ' , json_encode (new EnumFixture (EnumFixture::PROBLEMATIC_NUMBER )));
266- $ this ->assertJsonStringEqualsJsonString ('null ' , json_encode (new EnumFixture (EnumFixture::PROBLEMATIC_NULL )));
267- $ this ->assertJsonStringEqualsJsonString ('"" ' , json_encode (new EnumFixture (EnumFixture::PROBLEMATIC_EMPTY_STRING )));
268- $ this ->assertJsonStringEqualsJsonString ('false ' , json_encode (new EnumFixture (EnumFixture::PROBLEMATIC_BOOLEAN_FALSE )));
262+ $ this ->assertJsonEqualsJson ('"foo" ' , json_encode (new EnumFixture (EnumFixture::FOO )));
263+ $ this ->assertJsonEqualsJson ('"bar" ' , json_encode (new EnumFixture (EnumFixture::BAR )));
264+ $ this ->assertJsonEqualsJson ('42 ' , json_encode (new EnumFixture (EnumFixture::NUMBER )));
265+ $ this ->assertJsonEqualsJson ('0 ' , json_encode (new EnumFixture (EnumFixture::PROBLEMATIC_NUMBER )));
266+ $ this ->assertJsonEqualsJson ('null ' , json_encode (new EnumFixture (EnumFixture::PROBLEMATIC_NULL )));
267+ $ this ->assertJsonEqualsJson ('"" ' , json_encode (new EnumFixture (EnumFixture::PROBLEMATIC_EMPTY_STRING )));
268+ $ this ->assertJsonEqualsJson ('false ' , json_encode (new EnumFixture (EnumFixture::PROBLEMATIC_BOOLEAN_FALSE )));
269269 }
270270
271271 public function testNullableEnum ()
@@ -280,4 +280,9 @@ public function testBooleanEnum()
280280 $ this ->assertFalse (EnumFixture::PROBLEMATIC_BOOLEAN_FALSE ()->getValue ());
281281 $ this ->assertFalse ((new EnumFixture (EnumFixture::PROBLEMATIC_BOOLEAN_FALSE ))->jsonSerialize ());
282282 }
283+
284+ private function assertJsonEqualsJson ($ json1 , $ json2 )
285+ {
286+ $ this ->assertJsonStringEqualsJsonString ($ json1 , $ json2 );
287+ }
283288}
0 commit comments