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

testExists() public method

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