public function receiveData($data) { if ($this->getBufferLength() <= self::BYTE_INITIAL_LENGTH) { $this->length = null; $this->offset_payload = null; } parent::receiveData($data); }
/** * @param string $payload * @dataProvider getValidEncodePayloads */ public function testEncodePayloadReflection($type, $payload, $masked) { $this->frame->encode($payload, $type, $masked); $this->assertEquals($payload, $this->frame->getFramePayload(), 'Encode retains payload information'); }