mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-04 00:59:51 +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();
|
$states = BlockFactory::getAllKnownStates();
|
||||||
foreach($states as $k => $state){
|
foreach($states as $k => $state){
|
||||||
self::assertArrayHasKey($k, $list, "New block state $k (" . $state->getName() . ") - consistency check may need regenerating");
|
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){
|
foreach($list as $k => $name){
|
||||||
self::assertArrayHasKey($k, $states, "Missing previously-known block state $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