mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Added a test for Item->equals() when both items have no NBT
This commit is contained in:
@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user