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

testComposesObjects() public method

public testComposesObjects ( $metadata, $objects, $expectedSourceObjects )
    public function testComposesObjects($metadata, $objects, $expectedSourceObjects)
    {
        $acl = 'private';
        $destinationBucket = 'bucket';
        $destinationObject = 'combined-files.txt';
        $this->connection->composeObject(['destinationPredefinedAcl' => $acl, 'destination' => $metadata + ['contentType' => 'text/plain'], 'sourceObjects' => $expectedSourceObjects, 'destinationBucket' => $destinationBucket, 'destinationObject' => $destinationObject])->willReturn(['name' => $destinationObject, 'generation' => 1])->shouldBeCalledTimes(1);
        $bucket = new Bucket($this->connection->reveal(), $destinationBucket);
        $object = $bucket->compose($objects, $destinationObject, ['predefinedAcl' => $acl, 'metadata' => $metadata]);
        $this->assertEquals($destinationObject, $object->name());
    }