PayPal\Auth\PPCertificateCredential::getCertificatePath PHP Метод

getCertificatePath() публичный Метод

public getCertificatePath ( )
    public function getCertificatePath()
    {
        if (realpath($this->certificatePath)) {
            return realpath($this->certificatePath);
        } else {
            if (defined('PP_CONFIG_PATH')) {
                return constant('PP_CONFIG_PATH') . DIRECTORY_SEPARATOR . $this->certificatePath;
            } else {
                return realpath(dirname(__FILE__) . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . ".." . DIRECTORY_SEPARATOR . "config" . DIRECTORY_SEPARATOR . $this->certificatePath);
            }
        }
    }

Usage Example

 /**
  * @test
  */
 public function testGetCertificatePath()
 {
     $this->assertStringEndsWith(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'cacert.pem', $this->credential->getCertificatePath());
 }