diff --git a/tests/phpunit/block/BrewingStandTest.php b/tests/phpunit/block/BrewingStandTest.php index b3363b98c..aa175c740 100644 --- a/tests/phpunit/block/BrewingStandTest.php +++ b/tests/phpunit/block/BrewingStandTest.php @@ -34,9 +34,9 @@ class BrewingStandTest extends TestCase{ * @phpstan-return \Generator}, void, void> */ public static function slotsProvider() : \Generator{ - yield [array_values(BrewingStandSlot::getAll())]; - yield [[BrewingStandSlot::EAST()]]; - yield [[BrewingStandSlot::EAST(), BrewingStandSlot::NORTHWEST()]]; + yield [BrewingStandSlot::cases()]; + yield [[BrewingStandSlot::EAST]]; + yield [[BrewingStandSlot::EAST, BrewingStandSlot::NORTHWEST]]; } /** diff --git a/tests/phpunit/data/bedrock/DyeColorIdMapTest.php b/tests/phpunit/data/bedrock/DyeColorIdMapTest.php index b5561019f..a3ca6db25 100644 --- a/tests/phpunit/data/bedrock/DyeColorIdMapTest.php +++ b/tests/phpunit/data/bedrock/DyeColorIdMapTest.php @@ -29,10 +29,10 @@ use pocketmine\block\utils\DyeColor; class DyeColorIdMapTest extends TestCase{ public function testAllColorsMapped() : void{ - foreach(DyeColor::getAll() as $color){ + foreach(DyeColor::cases() as $color){ $id = DyeColorIdMap::getInstance()->toId($color); $color2 = DyeColorIdMap::getInstance()->fromId($id); - self::assertTrue($color2 !== null && $color->equals($color2)); + self::assertTrue($color === $color2); } } } diff --git a/tests/phpunit/item/BannerTest.php b/tests/phpunit/item/BannerTest.php index c555031a0..797ca60fc 100644 --- a/tests/phpunit/item/BannerTest.php +++ b/tests/phpunit/item/BannerTest.php @@ -36,7 +36,7 @@ final class BannerTest extends TestCase{ $item = VanillaBlocks::BANNER()->asItem(); assert($item instanceof Banner); $item->setPatterns([ - new BannerPatternLayer(BannerPatternType::FLOWER(), DyeColor::RED()) + new BannerPatternLayer(BannerPatternType::FLOWER, DyeColor::RED) ]); $data = $item->nbtSerialize(); @@ -45,6 +45,6 @@ final class BannerTest extends TestCase{ self::assertInstanceOf(Banner::class, $item2); $patterns = $item2->getPatterns(); self::assertCount(1, $patterns); - self::assertTrue(BannerPatternType::FLOWER()->equals($patterns[0]->getType())); + self::assertTrue(BannerPatternType::FLOWER === $patterns[0]->getType()); } }