setRequestId() public method

public setRequestId ( integer $requestId ) : Record
$requestId integer
return Record
Exemplo n.º 1
0
 public function testPackingPacket()
 {
     $record = new Record();
     $record->setRequestId(5);
     $record->setContentData('12345');
     $packet = (string) $record;
     $this->assertEquals($packet, hex2bin('010b0005000503003132333435000000'));
     $result = Record::unpack($packet);
     $this->assertEquals($result->getType(), FCGI::UNKNOWN_TYPE);
     $this->assertEquals($result->getRequestId(), 5);
     $this->assertEquals($result->getContentData(), '12345');
 }