Google\Cloud\Tests\Snippets\Storage\BucketTest::testCompose PHP Method

testCompose() public method

public testCompose ( )
    public function testCompose()
    {
        $snippet = $this->snippetFromMethod(Bucket::class, 'compose');
        $snippet->addLocal('bucket', $this->bucket);
        $this->connection->composeObject(Argument::any())->shouldBeCalled()->willReturn(['name' => 'combined-logs.txt', 'generation' => 'foo']);
        $this->bucket->setConnection($this->connection->reveal());
        $res = $snippet->invoke('singleObject');
        $this->assertInstanceOf(StorageObject::class, $res->returnVal());
        $this->assertEquals('combined-logs.txt', $res->returnVal()->name());
    }