@@ -166,21 +166,21 @@ public function testIsValid($value, $isValid)
166
166
167
167
public function isValidProvider ()
168
168
{
169
- return array (
169
+ return [
170
170
/**
171
171
* Valid values
172
172
*/
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 ] ,
179
179
/**
180
180
* Invalid values
181
181
*/
182
- array ( 'baz ' , false )
183
- ) ;
182
+ [ 'baz ' , false ]
183
+ ] ;
184
184
}
185
185
186
186
/**
@@ -259,13 +259,13 @@ public function testEqualsConflictValues()
259
259
*/
260
260
public function testJsonSerialize ()
261
261
{
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 )));
269
269
}
270
270
271
271
public function testNullableEnum ()
@@ -280,4 +280,9 @@ public function testBooleanEnum()
280
280
$ this ->assertFalse (EnumFixture::PROBLEMATIC_BOOLEAN_FALSE ()->getValue ());
281
281
$ this ->assertFalse ((new EnumFixture (EnumFixture::PROBLEMATIC_BOOLEAN_FALSE ))->jsonSerialize ());
282
282
}
283
+
284
+ private function assertJsonEqualsJson ($ json1 , $ json2 )
285
+ {
286
+ $ this ->assertJsonStringEqualsJsonString ($ json1 , $ json2 );
287
+ }
283
288
}
0 commit comments