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

testExists() public method

public testExists ( )
    public function testExists()
    {
        $snippet = $this->snippetFromMethod(StorageObject::class, 'exists');
        $snippet->addLocal('object', $this->object);
        $this->connection->getObject(Argument::any())->shouldBeCalled()->willReturn([]);
        $this->object->setConnection($this->connection->reveal());
        $res = $snippet->invoke();
        $this->assertEquals('Object exists!', $res->output());
    }