Skip to content

Commit b06347f

Browse files
committed
Fix assertions
1 parent 77b234a commit b06347f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/unit/Validator/StructureTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ public function testIntegerAsString(): void
281281
'$updatedAt' => '2000-04-01T12:00:00.000+00:00'
282282
])));
283283

284-
$this->assertEquals('Invalid document structure: Attribute "rating" has invalid type. Value must be a valid integer', $validator->getDescription());
284+
$this->assertEquals('Invalid document structure: Attribute "rating" has invalid type. Value must be a valid signed 32-bit integer between -2,147,483,648 and 2,147,483,647', $validator->getDescription());
285285
}
286286

287287
public function testValidDocument(): void
@@ -459,7 +459,7 @@ public function testIntegerValidation(): void
459459
'$updatedAt' => '2000-04-01T12:00:00.000+00:00'
460460
])));
461461

462-
$this->assertEquals('Invalid document structure: Attribute "rating" has invalid type. Value must be a valid integer', $validator->getDescription());
462+
$this->assertEquals('Invalid document structure: Attribute "rating" has invalid type. Value must be a valid signed 32-bit integer between -2,147,483,648 and 2,147,483,647', $validator->getDescription());
463463

464464
$this->assertEquals(false, $validator->isValid(new Document([
465465
'$collection' => ID::custom('posts'),
@@ -474,7 +474,7 @@ public function testIntegerValidation(): void
474474
'$updatedAt' => '2000-04-01T12:00:00.000+00:00'
475475
])));
476476

477-
$this->assertEquals('Invalid document structure: Attribute "rating" has invalid type. Value must be a valid integer', $validator->getDescription());
477+
$this->assertEquals('Invalid document structure: Attribute "rating" has invalid type. Value must be a valid signed 32-bit integer between -2,147,483,648 and 2,147,483,647', $validator->getDescription());
478478
}
479479

480480
public function testArrayOfIntegersValidation(): void
@@ -540,7 +540,7 @@ public function testArrayOfIntegersValidation(): void
540540
'$updatedAt' => '2000-04-01T12:00:00.000+00:00'
541541
])));
542542

543-
$this->assertEquals('Invalid document structure: Attribute "reviews[\'0\']" has invalid type. Value must be a valid integer', $validator->getDescription());
543+
$this->assertEquals('Invalid document structure: Attribute "reviews[\'0\']" has invalid type. Value must be a valid signed 32-bit integer between -2,147,483,648 and 2,147,483,647', $validator->getDescription());
544544
}
545545

546546
public function testFloatValidation(): void
@@ -662,7 +662,7 @@ public function testIntegerMaxRange(): void
662662
'$updatedAt' => '2000-04-01T12:00:00.000+00:00'
663663
])));
664664

665-
$this->assertEquals('Invalid document structure: Attribute "rating" has invalid type. Value must be a valid range between -2,147,483,647 and 2,147,483,647', $validator->getDescription());
665+
$this->assertEquals('Invalid document structure: Attribute "rating" has invalid type. Value must be a valid signed 32-bit integer between -2,147,483,648 and 2,147,483,647', $validator->getDescription());
666666
}
667667

668668
public function testDoubleUnsigned(): void

0 commit comments

Comments
 (0)