mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 08:17:34 +00:00
BlockFactory: enforce stricter checks
this can help catch out variant-related bugs.
This commit is contained in:
parent
b7b05e729e
commit
6cb263fcca
@ -146,9 +146,11 @@ class BlockTest extends TestCase{
|
||||
$states = BlockFactory::getAllKnownStates();
|
||||
foreach($states as $k => $state){
|
||||
self::assertArrayHasKey($k, $list, "New block state $k (" . $state->getName() . ") - consistency check may need regenerating");
|
||||
self::assertSame($list[$k], $state->getName());
|
||||
}
|
||||
foreach($list as $k => $name){
|
||||
self::assertArrayHasKey($k, $states, "Missing previously-known block state $k ($name)");
|
||||
self::assertSame($name, $states[$k]->getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user