diff --git a/tests/phpunit/inventory/BaseInventoryTest.php b/tests/phpunit/inventory/BaseInventoryTest.php new file mode 100644 index 000000000..ade55f317 --- /dev/null +++ b/tests/phpunit/inventory/BaseInventoryTest.php @@ -0,0 +1,59 @@ +setCustomName("TEST"); + + $inv->addItem(clone $item1); + self::assertFalse($inv->canAddItem($item2), "Item WITHOUT userdata should not stack with item WITH userdata"); + self::assertNotEmpty($inv->addItem($item2)); + + $inv->clearAll(); + self::assertEmpty($inv->getContents()); + + $inv->addItem(clone $item2); + self::assertFalse($inv->canAddItem($item1), "Item WITH userdata should not stack with item WITHOUT userdata"); + self::assertNotEmpty($inv->addItem($item1)); + } +}