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

testCreate() public method

public testCreate ( )
    public function testCreate()
    {
        $snippet = $this->snippetFromMethod(Topic::class, 'create');
        $snippet->addLocal('topic', $this->topic);
        $this->connection->createTopic(Argument::any())->shouldBeCalled()->willReturn([]);
        $this->topic->setConnection($this->connection->reveal());
        $res = $snippet->invoke('topicInfo');
        $this->assertEquals([], $res->returnVal());
    }