File tree 3 files changed +7
-2
lines changed
Schema/BasicSchemaGenerationTest 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ static function (string $element): string {
28
28
29
29
$ attributeName = join ('' , $ elements );
30
30
31
- if (empty ( $ attributeName) ) {
31
+ if ($ attributeName === '' ) {
32
32
throw new SchemaException (
33
33
sprintf (
34
34
"Name '%s' results in an empty name in file %s " ,
Original file line number Diff line number Diff line change @@ -275,7 +275,8 @@ public function testPropertyNamesAreNormalized(): void
275
275
'space property ' => ' ' ,
276
276
'numeric42 ' => 13 ,
277
277
'1000 ' => 1000 ,
278
- '1000string ' => '1000 '
278
+ '1000string ' => '1000 ' ,
279
+ '0 ' => 0 ,
279
280
]);
280
281
281
282
$ this ->assertSame ('___ ' , $ object ->getUnderscoreProperty ());
@@ -284,6 +285,7 @@ public function testPropertyNamesAreNormalized(): void
284
285
$ this ->assertSame (13 , $ object ->getNumeric42 ());
285
286
$ this ->assertSame (1000 , $ object ->get1000 ());
286
287
$ this ->assertSame ('1000 ' , $ object ->get1000string ());
288
+ $ this ->assertSame (0 , $ object ->get0 ());
287
289
}
288
290
289
291
public function testEmptyNormalizedPropertyNameThrowsAnException (): void
Original file line number Diff line number Diff line change 21
21
},
22
22
"1000string" : {
23
23
"type" : " string"
24
+ },
25
+ "0" : {
26
+ "type" : " integer"
24
27
}
25
28
}
26
29
}
You can’t perform that action at this time.
0 commit comments