mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-04 17:06:16 +00:00
Eliminate usages of BinaryStream->setBuffer() and BinaryStream->reset()
This commit is contained in:
@ -24,6 +24,7 @@ declare(strict_types=1);
|
||||
namespace pocketmine\network\mcpe\protocol;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
use pocketmine\network\mcpe\protocol\serializer\PacketSerializer;
|
||||
|
||||
class DataPacketTest extends TestCase{
|
||||
|
||||
@ -34,7 +35,7 @@ class DataPacketTest extends TestCase{
|
||||
$pk->encode();
|
||||
|
||||
$pk2 = new TestPacket();
|
||||
$pk2->getSerializer()->setBuffer($pk->getSerializer()->getBuffer());
|
||||
$pk2->setSerializer(new PacketSerializer($pk->getSerializer()->getBuffer()));
|
||||
$pk2->decode();
|
||||
self::assertSame($pk2->senderSubId, 3);
|
||||
self::assertSame($pk2->recipientSubId, 2);
|
||||
|
Reference in New Issue
Block a user