mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
Fixed build
This commit is contained in:
parent
4a5bdefe8b
commit
e43bca95bf
@ -25,6 +25,7 @@ namespace pocketmine\block;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use function file_get_contents;
|
||||
use function is_array;
|
||||
use function json_decode;
|
||||
|
||||
class BlockTest extends TestCase{
|
||||
@ -145,6 +146,9 @@ class BlockTest extends TestCase{
|
||||
|
||||
public function testConsistency() : void{
|
||||
$list = json_decode(file_get_contents(__DIR__ . '/block_factory_consistency_check.json'), true);
|
||||
if(!is_array($list)){
|
||||
throw new \pocketmine\utils\AssumptionFailedError("Old table should be array{knownStates: array<string, string>, remaps: array<string, int>}");
|
||||
}
|
||||
$knownStates = $list["knownStates"];
|
||||
$remaps = $list["remaps"];
|
||||
|
||||
|
@ -36,6 +36,9 @@ foreach($factory->getAllKnownStates() as $index => $block){
|
||||
}
|
||||
}
|
||||
$oldTable = json_decode(file_get_contents(__DIR__ . '/block_factory_consistency_check.json'), true);
|
||||
if(!is_array($oldTable)){
|
||||
throw new \pocketmine\utils\AssumptionFailedError("Old table should be array{knownStates: array<string, string>, remaps: array<string, int>}");
|
||||
}
|
||||
$old = $oldTable["knownStates"];
|
||||
$oldRemaps = $oldTable["remaps"];
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user