mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-21 00:07:30 +00:00
Broaden scope of testing for item serializer/deserializer
this change will cause failing tests; it has found a problem with coral fans of which I was previously unaware
This commit is contained in:
parent
1a598bdfd8
commit
643556a366
@ -24,8 +24,8 @@ declare(strict_types=1);
|
||||
namespace pocketmine\data\bedrock\item;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use pocketmine\block\VanillaBlocks;
|
||||
use pocketmine\item\VanillaItems;
|
||||
use pocketmine\block\BlockFactory;
|
||||
use pocketmine\item\ItemFactory;
|
||||
|
||||
final class ItemSerializerDeserializerTest extends TestCase{
|
||||
|
||||
@ -38,7 +38,7 @@ final class ItemSerializerDeserializerTest extends TestCase{
|
||||
}
|
||||
|
||||
public function testAllVanillaItemsSerializableAndDeserializable() : void{
|
||||
foreach(VanillaItems::getAll() as $item){
|
||||
foreach(ItemFactory::getInstance()->getAllRegistered() as $item){
|
||||
if($item->isNull()){
|
||||
continue;
|
||||
}
|
||||
@ -51,7 +51,7 @@ final class ItemSerializerDeserializerTest extends TestCase{
|
||||
}
|
||||
|
||||
public function testAllVanillaBlocksSerializableAndDeserializable() : void{
|
||||
foreach(VanillaBlocks::getAll() as $block){
|
||||
foreach(BlockFactory::getInstance()->getAllKnownStates() as $block){
|
||||
$item = $block->asItem();
|
||||
if($item->isNull()){
|
||||
continue;
|
||||
|
Loading…
x
Reference in New Issue
Block a user