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

testInfo() public method

public testInfo ( )
    public function testInfo()
    {
        $snippet = $this->snippetFromMethod(Topic::class, 'info');
        $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());
    }