Exemplo n.º 1
0
 /**
  * @param string $type
  *
  * @return array[]
  */
 private function valueArray($type)
 {
     $count = $this->reader->long();
     $values = array();
     for ($i = 0; $i < $count; $i++) {
         $values[] = $this->{$type}();
     }
     return $values;
 }
 public function testReadingXDRHexDouble()
 {
     $value = '0040411D70A3D70A3D';
     $reader = new BinaryReader($value);
     $reader->byteOrder();
     $result = $reader->double();
     $this->assertEquals(34.23, $result);
 }