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:
Dylan K. Taylor 2022-05-13 13:35:58 +01:00
parent 1a598bdfd8
commit 643556a366
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -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;