@@ -166,21 +166,21 @@ public function testIsValid($value, $isValid)
166166
167167 public function isValidProvider ()
168168 {
169- return array (
169+ return [
170170 /**
171171 * Valid values
172172 */
173- array ( 'foo ' , true ) ,
174- array ( 42 , true ) ,
175- array ( null , true ) ,
176- array ( 0 , true ) ,
177- array ( '' , true ) ,
178- array ( false , true ) ,
173+ [ 'foo ' , true ] ,
174+ [ 42 , true ] ,
175+ [ null , true ] ,
176+ [ 0 , true ] ,
177+ [ '' , true ] ,
178+ [ false , true ] ,
179179 /**
180180 * Invalid values
181181 */
182- array ( 'baz ' , false )
183- ) ;
182+ [ 'baz ' , false ]
183+ ] ;
184184 }
185185
186186 /**
@@ -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