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

testComposeWithObjects() public method

    public function testComposeWithObjects()
    {
        $snippet = $this->snippetFromMethod(Bucket::class, 'compose', 1);
        $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());
    }