Merge branch 'minor-next' into major-next

This commit is contained in:
Dylan K. Taylor 2023-09-07 20:30:58 +01:00
commit f1a6d71cc1
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D
3 changed files with 7 additions and 7 deletions

View File

@ -34,9 +34,9 @@ class BrewingStandTest extends TestCase{
* @phpstan-return \Generator<int, array{list<BrewingStandSlot>}, void, void> * @phpstan-return \Generator<int, array{list<BrewingStandSlot>}, void, void>
*/ */
public static function slotsProvider() : \Generator{ public static function slotsProvider() : \Generator{
yield [array_values(BrewingStandSlot::getAll())]; yield [BrewingStandSlot::cases()];
yield [[BrewingStandSlot::EAST()]]; yield [[BrewingStandSlot::EAST]];
yield [[BrewingStandSlot::EAST(), BrewingStandSlot::NORTHWEST()]]; yield [[BrewingStandSlot::EAST, BrewingStandSlot::NORTHWEST]];
} }
/** /**

View File

@ -29,10 +29,10 @@ use pocketmine\block\utils\DyeColor;
class DyeColorIdMapTest extends TestCase{ class DyeColorIdMapTest extends TestCase{
public function testAllColorsMapped() : void{ public function testAllColorsMapped() : void{
foreach(DyeColor::getAll() as $color){ foreach(DyeColor::cases() as $color){
$id = DyeColorIdMap::getInstance()->toId($color); $id = DyeColorIdMap::getInstance()->toId($color);
$color2 = DyeColorIdMap::getInstance()->fromId($id); $color2 = DyeColorIdMap::getInstance()->fromId($id);
self::assertTrue($color2 !== null && $color->equals($color2)); self::assertTrue($color === $color2);
} }
} }
} }

View File

@ -36,7 +36,7 @@ final class BannerTest extends TestCase{
$item = VanillaBlocks::BANNER()->asItem(); $item = VanillaBlocks::BANNER()->asItem();
assert($item instanceof Banner); assert($item instanceof Banner);
$item->setPatterns([ $item->setPatterns([
new BannerPatternLayer(BannerPatternType::FLOWER(), DyeColor::RED()) new BannerPatternLayer(BannerPatternType::FLOWER, DyeColor::RED)
]); ]);
$data = $item->nbtSerialize(); $data = $item->nbtSerialize();
@ -45,6 +45,6 @@ final class BannerTest extends TestCase{
self::assertInstanceOf(Banner::class, $item2); self::assertInstanceOf(Banner::class, $item2);
$patterns = $item2->getPatterns(); $patterns = $item2->getPatterns();
self::assertCount(1, $patterns); self::assertCount(1, $patterns);
self::assertTrue(BannerPatternType::FLOWER()->equals($patterns[0]->getType())); self::assertTrue(BannerPatternType::FLOWER === $patterns[0]->getType());
} }
} }