Google\Cloud\Tests\Storage\BucketTest::testUploadData PHP Method

testUploadData() public method

public testUploadData ( )
    public function testUploadData()
    {
        $this->resumableUploader->upload()->willReturn(['name' => 'file.txt', 'generation' => 123]);
        $this->connection->insertObject(Argument::any())->willReturn($this->resumableUploader);
        $bucket = new Bucket($this->connection->reveal(), 'bucket');
        $this->assertInstanceOf('Google\\Cloud\\Storage\\StorageObject', $bucket->upload('some data to upload', ['name' => 'data.txt']));
    }