diff --git a/tests/phpunit/item/ItemTest.php b/tests/phpunit/item/ItemTest.php index f1be994f3..b519dcaaa 100644 --- a/tests/phpunit/item/ItemTest.php +++ b/tests/phpunit/item/ItemTest.php @@ -43,6 +43,15 @@ class ItemTest extends TestCase{ self::assertTrue($item->equals($item2)); } + /** + * Test that same items without NBT are considered equal + */ + public function testItemEqualsNoNbt() : void{ + $item1 = ItemFactory::get(Item::DIAMOND_SWORD); + $item2 = clone $item1; + self::assertTrue($item1->equals($item2)); + } + /** * Tests that blocks are considered to be valid registered items */