public function testGetBodyWithoutExtraOptions() { $bucket = 'bucket'; $object = 'object.txt'; $stream = Psr7\stream_for($string = 'abcdefg'); $this->connection->downloadObject(['bucket' => $bucket, 'object' => $object, 'generation' => null])->willReturn($stream); $object = new StorageObject($this->connection->reveal(), $object, $bucket); $body = $object->downloadAsStream(); $this->assertInstanceOf(StreamInterface::class, $body); $this->assertEquals($string, $body); }