writeDouble() public method

Encode a number as a 64bit double.
public writeDouble ( Stream $stream, float $value )
$stream Protobuf\Stream
$value float
 /**
  * @dataProvider providerDouble
  */
 public function testComputeDoubleSize($value)
 {
     $stream = Stream::create();
     $this->writer->writeDouble($stream, $value);
     $streamSize = $stream->getSize();
     $actualSize = $this->calculator->computeDoubleSize($value);
     $this->assertEquals($streamSize, $actualSize);
 }
 public function testWriteStream()
 {
     $source = Stream::create();
     $target = Stream::create();
     $writer = new StreamWriter($this->config);
     $writer->writeVarint($source, WireFormat::getFieldKey(1, WireFormat::WIRE_FIXED64));
     $writer->writeDouble($source, 123456789.12345);
     $source->seek(0);
     $writer->writeStream($target, $source);
     $this->assertEquals((string) $source, (string) $target);
 }