diff --git a/tests/AbstractTest.php b/tests/AbstractTest.php index 570054f..6c6aa65 100644 --- a/tests/AbstractTest.php +++ b/tests/AbstractTest.php @@ -10,7 +10,6 @@ abstract class AbstractTest extends TestCase { const OUTPUT_DIR = __DIR__ . "/output"; const CERTS_DIR = __DIR__ . "/certs"; const FACTURAE_CERT_PASS = "1234"; - const WEBSERVICES_CERT_PASS = "IZProd2021"; const NOTIFICATIONS_EMAIL = "josemmo@pm.me"; const COOKIES_PATH = self::OUTPUT_DIR . "/cookies.txt"; diff --git a/tests/WebservicesTest.php b/tests/WebservicesTest.php index 9ef3a49..0d9dd98 100644 --- a/tests/WebservicesTest.php +++ b/tests/WebservicesTest.php @@ -51,7 +51,7 @@ private function getWsBaseInvoice() { public function testFace() { $this->checkEnv(); - $face = new FaceClient(self::CERTS_DIR . "/webservices.p12", null, self::WEBSERVICES_CERT_PASS); + $face = new FaceClient(self::CERTS_DIR . "/facturae.p12", null, self::FACTURAE_CERT_PASS); $face->setProduction(false); // Test misc. methods @@ -92,7 +92,7 @@ public function testFace() { ]) ] ])); - $fac->sign(self::CERTS_DIR . "/webservices.p12", null, self::WEBSERVICES_CERT_PASS); + $fac->sign(self::CERTS_DIR . "/facturae.p12", null, self::FACTURAE_CERT_PASS); // Send invoice $invoiceFile = new FacturaeFile(); @@ -131,7 +131,7 @@ public function testCustomFace() { public function testFaceb2b() { $this->checkEnv(); - $faceb2b = new Faceb2bClient(self::CERTS_DIR . "/webservices.p12", null, self::WEBSERVICES_CERT_PASS); + $faceb2b = new Faceb2bClient(self::CERTS_DIR . "/facturae.p12", null, self::FACTURAE_CERT_PASS); $faceb2b->setProduction(false); // Test misc. methods @@ -158,7 +158,7 @@ public function testFaceb2b() { "code" => "ESA789231250000", "name" => "Centro administrativo receptor" ])); - $fac->sign(self::CERTS_DIR . "/webservices.p12", null, self::WEBSERVICES_CERT_PASS); + $fac->sign(self::CERTS_DIR . "/facturae.p12", null, self::FACTURAE_CERT_PASS); // Send invoice $invoiceFile = new FacturaeFile(); diff --git a/tests/certs/facturae-private.pem b/tests/certs/facturae-private.pem index 2b03bdb..41e9cea 100644 --- a/tests/certs/facturae-private.pem +++ b/tests/certs/facturae-private.pem @@ -1,30 +1,30 @@ -----BEGIN ENCRYPTED PRIVATE KEY----- -MIIFHDBOBgkqhkiG9w0BBQ0wQTApBgkqhkiG9w0BBQwwHAQIG4Kky+Gm/VICAggA -MAwGCCqGSIb3DQIJBQAwFAYIKoZIhvcNAwcECLtOZxo5MtoqBIIEyGblv9lcZ4gh -9UMmH4DvngSuZQ8V4hboG3Eqd0YVpLs8r+/CXXh11J7f6EJKwaGKIxb9s7YI6t2u -KdtNhfv8KzBpl9yQx2LPtuyb4QUcrPuOMQ6I6AneKLyvDXWFUCRw3XM/1oqlzxjP -9G4RxEsxiLJuPaTPxhSAbi7hdm7RREXmL/4+gs1fxjk98bvDAmZDpjnxgEiXeZE1 -qOlvWm6MHL/Qo3kpbk6DKk3uqpcX12T6/LwDX35zktzu6BzrukvS5tvmZH0gFJYv -+YXllJPE5OAaxLBGPVhVOZGMs5Fe9adcr0dcTzJGc5hC25pnHIl39/aiiLQ0sKUQ -MkV/rV8ChoRiA++rlC6Pcm0ucco1pYnejCPaTPfvEL2GPWp5O4CU+UQL+X+hdmd2 -vAprvikEIxT3XjrKe+iQTRdZkwIcRjpFo6qvxN2lHhIQjAJE4U3gfnHE1tCAvrA/ -fP/ThSRGI268zw0MFx2hGELwUSbt5WXV6ajXg+tWP3FUgSy/amcxeezUUqiq4KMe -OPzKFSvekkfEQjVi5R/HxeLkCbJrhDXmxhtrLKRE47kdfNB8MSaufuhJJrstvCJ+ -7UWRWl6tvWpVB0oJPD8NXq+eV8Hv9onsuie/Vg2c13Sj2Gu21QHkIOAElvktFTi0 -kV/gj2DCPWZEi71fejpHKdQzBykbMaibzNcDqiVb0tElEo0QjZhjxc69tYgSSAY2 -zLMHybeA9ea/8S4MTC2A655X/5cgwQWRcAz8Iks4bBQLknjoIC9va8/K6JfScf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mdMEJwSsLmAcQy0Px69GMC2w8HidkdDwCKRLvo +thy+gfIShXTCCwY0N2IwxUNv17XIFV+uIatR83evDEOqMypybhGA9sXHrGKJz9/e +AquF82caXsULkvdbxtd+PPn/GAP9+kY4HfWfrlWkgXk7PMQtHJT+JSfMza8qKtnV +p+cruUAvrS0DgApLWxQt2TDPPXdGxlWAJmeu2cNVUNGfbTfWx4w8sSQy0zQrG26e +X3otyVIf8fs7cvQxox9EBLcLxFwQiMeqz96QVs3ymFh1kpUthBW6894pb1RT3V66 +DtIpATu8F1Vf1Umas/TgMzJRnA0CUzPXY6xjIPGMc08kKYK8wnhEmHqT8929PGm/ +0l1D+F7vGKsbZy2vn/bdR+EdKpS7WQbysRtGuOXyWfjzfxqXvEg+dO7sNjmCBz7W +tdhZSfdBQ8knPIScdX4bkABZhSat3pGbk/HcZ4k1AbamPh63/AHT6XIRYqPxyLUU +O6kkEbFOeT76+wGstBGYPQICGUjd3EqBlJLSBEkIiWY8 -----END ENCRYPTED PRIVATE KEY----- \ No newline at end of file diff --git a/tests/certs/facturae-public.pem b/tests/certs/facturae-public.pem index 22dd397..8938204 100644 --- a/tests/certs/facturae-public.pem +++ b/tests/certs/facturae-public.pem @@ -1,43 +1,43 @@ -----BEGIN CERTIFICATE----- -MIIHhjCCBm6gAwIBAgIQSOSlyjvRFUlfo/hUFNAvqDANBgkqhkiG9w0BAQsFADBL +MIIHoDCCBoigAwIBAgIQc/g6LlAaVg9l7w+qq1iLnzANBgkqhkiG9w0BAQsFADBL MQswCQYDVQQGEwJFUzERMA8GA1UECgwIRk5NVC1SQ00xDjAMBgNVBAsMBUNlcmVz -MRkwFwYDVQQDDBBBQyBGTk1UIFVzdWFyaW9zMB4XDTIwMTEwNTEzMDQyMFoXDTI0 -MTEwNTEzMDQyMFowgYUxCzAJBgNVBAYTAkVTMRgwFgYDVQQFEw9JRENFUy05OTk5 -OTk5OVIxEDAOBgNVBCoMB1BSVUVCQVMxGjAYBgNVBAQMEUVJREFTIEN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UZOTVQtUkNNLGM9RVM/Y2VydGlmaWNhdGVSZXZvY2F0aW9u +TGlzdDtiaW5hcnk/YmFzZT9vYmplY3RjbGFzcz1jUkxEaXN0cmlidXRpb25Qb2lu +dIYtaHR0cDovL3d3dy5jZXJ0LmZubXQuZXMvY3Jsc2FjdXN1L0NSTFU4NjkuY3Js +MA0GCSqGSIb3DQEBCwUAA4IBAQA+YKUUF+kIW32y+vbAmSr+8aYswNC7NPV/utEq +uxX3VBGL3xLDUgkQ+5iiW7G194p93Ynnl639g070Q0SmuOPlQhgqYIMrYZbm8L1e +AlbvqLsSIeRVhPaSbHzwbmUG5hQ7hZQ4ClG2xZcOC2auPb6UOLMEpSCs2TtuYZmn +Ivh+t9YRrfFAUSLB315GHycdtrjOeEz68Dz+2UdvSmla3OO3X7XgDKqSSlul2vce +Znp+cy07trzwiwyN+lq3icNT3bgu8eXeu05kvLklADjbNq509n3KSnAWRC44i1Xg +5zXzm95KmcidynauRr6XqU0ENKHRLEWn4CltdYFkb6VtvuLC -----END CERTIFICATE----- \ No newline at end of file diff --git a/tests/certs/facturae.p12 b/tests/certs/facturae.p12 index 5867c10..dd9b424 100644 Binary files a/tests/certs/facturae.p12 and b/tests/certs/facturae.p12 differ diff --git a/tests/certs/webservices.p12 b/tests/certs/webservices.p12 deleted file mode 100644 index 53c7051..0000000 Binary files a/tests/certs/webservices.p12 and /dev/null differ