public function testItemChatLinkEncodeSimple() { $itemStack = ItemStack::fromArray(['count' => 1, 'id' => 19721]); $chatlink = new ItemChatlink($itemStack); $this->assertSame($itemStack, $chatlink->getItemStack(), 'ItemChatlink should return the correct ItemStack instance'); $chatcode = $chatlink->encode(); $this->assertEquals('[&AgEJTQAA]', $chatcode, 'ItemChatlink should encode the ItemStack correctly'); }