From dfc6f01b38d1c8c97a7f9753992c7f13372da587 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 12 Nov 2024 17:00:52 +0000 Subject: [PATCH] Explicit tests for missing type ID constants --- tests/phpunit/block/BlockTypeIdsTest.php | 1 + tests/phpunit/item/ItemTypeIdsTest.php | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/phpunit/block/BlockTypeIdsTest.php b/tests/phpunit/block/BlockTypeIdsTest.php index 32c8d490295..ce21a89ab68 100644 --- a/tests/phpunit/block/BlockTypeIdsTest.php +++ b/tests/phpunit/block/BlockTypeIdsTest.php @@ -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"); } } diff --git a/tests/phpunit/item/ItemTypeIdsTest.php b/tests/phpunit/item/ItemTypeIdsTest.php index 7ac8485fccd..7336780b33f 100644 --- a/tests/phpunit/item/ItemTypeIdsTest.php +++ b/tests/phpunit/item/ItemTypeIdsTest.php @@ -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"); } }