Wrep\Notificato\Apns\Certificate::hasPassphrase PHP Method

hasPassphrase() public method

Checks if there is a passphrase to use with the certificate
public hasPassphrase ( ) : boolean
return boolean
    public function hasPassphrase()
    {
        return strlen($this->passphrase) > 0;
    }

Usage Example

 /**
  * @dataProvider correctConstructorArguments
  */
 public function testHasPassphrase($pemFile, $passphrase, $validate, $endpoint, $hasPassphrase)
 {
     $certificate = new Certificate($pemFile, $passphrase, $validate, $endpoint);
     $this->assertEquals($hasPassphrase, $certificate->hasPassphrase(), 'Has passphrase returned incorrect result.');
 }