Skip to content

Commit

Permalink
Explicit tests for missing type ID constants
Browse files Browse the repository at this point in the history
  • Loading branch information
dktapps committed Nov 12, 2024
1 parent 6611a81 commit dfc6f01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions tests/phpunit/block/BlockTypeIdsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public function testVanillaBlocksParity() : void{
foreach(Utils::stringifyKeys(VanillaBlocks::getAll()) as $name => $block){
$expected = $block->getTypeId();
$actual = $reflect->getConstant($name);
self::assertNotFalse($actual, "VanillaBlocks::$name() does not have a BlockTypeIds constant");
self::assertSame($expected, $actual, "VanillaBlocks::$name() does not match BlockTypeIds::$name");
}
}
Expand Down
1 change: 1 addition & 0 deletions tests/phpunit/item/ItemTypeIdsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ public function testVanillaItemsParity() : void{
}
$expected = $item->getTypeId();
$actual = $reflect->getConstant($name);
self::assertNotFalse($actual, "VanillaItems::$name() does not have an ItemTypeIds constant");
self::assertSame($expected, $actual, "VanillaItems::$name() type ID does not match ItemTypeIds::$name");
}
}
Expand Down

0 comments on commit dfc6f01

Please sign in to comment.