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

testReload() public method

public testReload ( )
    public function testReload()
    {
        $snippet = $this->snippetFromMethod(StorageObject::class, 'reload');
        $snippet->addLocal('object', $this->object);
        $this->connection->getObject(Argument::any())->shouldBeCalled()->willReturn(['name' => self::OBJECT, 'bucket' => self::BUCKET, 'size' => 1, 'location' => 'right behind you!']);
        $this->object->setConnection($this->connection->reveal());
        $res = $snippet->invoke();
        $this->assertEquals('right behind you!', $res->output());
    }