PayPal\Auth\PPCertificateCredential::validate PHP Method

validate() public method

public validate ( )
    public function validate()
    {
        if (empty($this->userName)) {
            throw new PPMissingCredentialException("username cannot be empty");
        }
        if (empty($this->password)) {
            throw new PPMissingCredentialException("password cannot be empty");
        }
        if (empty($this->certificatePath)) {
            throw new PPMissingCredentialException("certificate cannot be empty");
        }
    }

Usage Example

 /**
  * @test
  */
 public function testValidateCertPath()
 {
     $this->setExpectedException('PayPal\\Exception\\PPMissingCredentialException');
     $credCertPath = new PPCertificateCredential("platfo_1255077030_biz_api1.gmail.com", "1255077037", "");
     $credCertPath->validate();
 }