Google\Cloud\Tests\PubSub\PubSubClientTest::testSubscription PHP Method

testSubscription() public method

public testSubscription ( )
    public function testSubscription()
    {
        $this->connection->getSubscription(Argument::any())->shouldBeCalledTimes(1)->willReturn(['foo' => 'bar']);
        $this->client->setConnection($this->connection->reveal());
        $subscription = $this->client->subscription('subscription-name', 'topic-name');
        $info = $subscription->info();
        $this->assertInstanceOf(Subscription::class, $subscription);
        $this->assertEquals('bar', $info['foo']);
    }