Google\Cloud\Tests\Snippets\PubSub\TopicTest::testReload PHP Method

testReload() public method

public testReload ( )
    public function testReload()
    {
        $snippet = $this->snippetFromMethod(Topic::class, 'reload');
        $snippet->addLocal('topic', $this->topic);
        $this->connection->getTopic(Argument::any())->shouldBeCalled()->willReturn(['name' => self::TOPIC]);
        $this->topic->setConnection($this->connection->reveal());
        $res = $snippet->invoke();
        $this->assertEquals(self::TOPIC, $res->output());
    }