Google\Cloud\PubSub\Subscription::name PHP Method

name() public method

Example: echo $subscription->name();
public name ( ) : string
return string
    public function name()
    {
        return $this->name;
    }

Usage Example

 public function testName()
 {
     $subscription = new Subscription($this->connection->reveal(), 'test-subscription-name', 'test-topic-name', 'my-project');
     $this->assertEquals($subscription->name(), 'projects/my-project/subscriptions/test-subscription-name');
 }