Google\Cloud\Tests\Snippets\Storage\StorageObjectTest::testDownloadAsString PHP Method

testDownloadAsString() public method

    public function testDownloadAsString()
    {
        $snippet = $this->snippetFromMethod(StorageObject::class, 'downloadAsString');
        $snippet->addLocal('object', $this->object);
        $this->connection->downloadObject(Argument::any())->shouldBeCalled()->willReturn(\GuzzleHttp\Psr7\stream_for('test'));
        $this->object->setConnection($this->connection->reveal());
        $res = $snippet->invoke();
        $this->assertEquals('test', $res->output());
    }