From d827f2d885eb67524c0567a316ee71c238dba8b8 Mon Sep 17 00:00:00 2001 From: Tim van Dijen Date: Fri, 14 Jun 2024 00:09:16 +0200 Subject: [PATCH] Fix cleanup-job --- .github/workflows/php.yml | 2 +- tests/SAML2/CustomRoleDescriptor.php | 4 ++-- tests/SAML2/Response/SignatureValidationTest.php | 2 +- .../ConstraintValidator/DestinationMatchesTest.php | 2 +- .../Validation/ConstraintValidator/IsSuccessfulTest.php | 2 +- tests/SAML2/SOAPTest.php | 9 +++------ tests/bin/encryptedassertion.php | 2 +- tests/bin/encryptedattribute.php | 2 +- tests/bin/encryptedid.php | 2 +- tests/bin/logoutrequest.php | 4 ++-- 10 files changed, 14 insertions(+), 17 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index eebb58608..564306b04 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -274,7 +274,7 @@ jobs: if: | always() && needs.coverage.result == 'success' || - (needs.unit-tests-linux == 'success' && needs.coverage == 'skipped') + (needs.unit-tests-linux.result == 'success' && needs.coverage.result == 'skipped') steps: - uses: geekyeggo/delete-artifact@v5 diff --git a/tests/SAML2/CustomRoleDescriptor.php b/tests/SAML2/CustomRoleDescriptor.php index ba506fb10..889dbd0d3 100644 --- a/tests/SAML2/CustomRoleDescriptor.php +++ b/tests/SAML2/CustomRoleDescriptor.php @@ -64,7 +64,7 @@ public function __construct( array $keyDescriptor = [], ?Organization $organization = null, array $contact = [], - array $namespacedAttributes = [] + array $namespacedAttributes = [], ) { Assert::allIsInstanceOf($chunk, Chunk::class); @@ -112,7 +112,7 @@ public static function fromXML(DOMElement $xml): static Assert::true( $xml->hasAttributeNS(C::NS_XSI, 'type'), 'Missing required xsi:type in element.', - InvalidDOMElementException::class + InvalidDOMElementException::class, ); $type = $xml->getAttributeNS(C::NS_XSI, 'type'); diff --git a/tests/SAML2/Response/SignatureValidationTest.php b/tests/SAML2/Response/SignatureValidationTest.php index a62ff32b0..81e2362e8 100644 --- a/tests/SAML2/Response/SignatureValidationTest.php +++ b/tests/SAML2/Response/SignatureValidationTest.php @@ -157,7 +157,7 @@ public function testThatAnUnsignedResponseWithNoSignedAssertionsThrowsAnExceptio $assertion = Assertion::fromXML( DOMDocumentFactory::fromFile( dirname(__FILE__, 3) . '/resources/xml/saml_Assertion.xml', - )->documentElement + )->documentElement, ); // The processAssertions is called to decrypt possible encrypted assertions, diff --git a/tests/SAML2/Response/Validation/ConstraintValidator/DestinationMatchesTest.php b/tests/SAML2/Response/Validation/ConstraintValidator/DestinationMatchesTest.php index 513ef100d..6e3631452 100644 --- a/tests/SAML2/Response/Validation/ConstraintValidator/DestinationMatchesTest.php +++ b/tests/SAML2/Response/Validation/ConstraintValidator/DestinationMatchesTest.php @@ -55,7 +55,7 @@ public function testAResponseIsNotValidWhenTheDestinationsAreNotEqual(): void { $this->response->shouldReceive('getDestination')->once()->andReturn('FOO'); $validator = new DestinationMatches( - new Destination('BAR') + new Destination('BAR'), ); $result = new Result(); diff --git a/tests/SAML2/Response/Validation/ConstraintValidator/IsSuccessfulTest.php b/tests/SAML2/Response/Validation/ConstraintValidator/IsSuccessfulTest.php index bff3ea850..88a51446c 100644 --- a/tests/SAML2/Response/Validation/ConstraintValidator/IsSuccessfulTest.php +++ b/tests/SAML2/Response/Validation/ConstraintValidator/IsSuccessfulTest.php @@ -65,7 +65,7 @@ public function testAnUnsuccessfulResponseIsNotValidAndGeneratesAProperErrorMess ), ], ), - new StatusMessage('this is a test message') + new StatusMessage('this is a test message'), ); $this->response->shouldReceive('isSuccess')->once()->andReturn(false); diff --git a/tests/SAML2/SOAPTest.php b/tests/SAML2/SOAPTest.php index dc6077478..bad0f993a 100644 --- a/tests/SAML2/SOAPTest.php +++ b/tests/SAML2/SOAPTest.php @@ -58,8 +58,7 @@ public function testRequestParsing(): void -SOAP - ); +SOAP); $request = new ServerRequest('', ''); $message = $stub->receive($request); @@ -85,8 +84,7 @@ public function testSendArtifactResponse(): void $doc = DOMDocumentFactory::fromString(<< -SOAP - ); +SOAP); /** @var \DOMElement $body */ $body = $doc->getElementsByTagNameNS(C::NS_SOAP_ENV_11, 'Body')->item(0); @@ -111,8 +109,7 @@ public function testSendResponse(): void $doc = DOMDocumentFactory::fromString(<< -SOAP - ); +SOAP); $requestAuthenticated = new RequestAuthenticated(true); $ecpResponse = new Response('https://example.org/metadata'); diff --git a/tests/bin/encryptedassertion.php b/tests/bin/encryptedassertion.php index 581b50a8a..b7f3fea0b 100644 --- a/tests/bin/encryptedassertion.php +++ b/tests/bin/encryptedassertion.php @@ -18,7 +18,7 @@ $encryptor = (new KeyTransportAlgorithmFactory())->getAlgorithm( C::KEY_TRANSPORT_OAEP_MGF1P, - PEMCertificatesMock::getPublicKey(PEMCertificatesMock::SELFSIGNED_PUBLIC_KEY) + PEMCertificatesMock::getPublicKey(PEMCertificatesMock::SELFSIGNED_PUBLIC_KEY), ); $document = DOMDocumentFactory::fromFile(dirname(__FILE__, 2) . '/resources/xml/saml_Assertion.xml'); diff --git a/tests/bin/encryptedattribute.php b/tests/bin/encryptedattribute.php index ecf42c96d..05cbadc2a 100644 --- a/tests/bin/encryptedattribute.php +++ b/tests/bin/encryptedattribute.php @@ -18,7 +18,7 @@ $encryptor = (new KeyTransportAlgorithmFactory())->getAlgorithm( C::KEY_TRANSPORT_OAEP, - PEMCertificatesMock::getPublicKey(PEMCertificatesMock::PUBLIC_KEY) + PEMCertificatesMock::getPublicKey(PEMCertificatesMock::PUBLIC_KEY), ); $attribute = new Attribute( name: 'urn:encrypted:attribute', diff --git a/tests/bin/encryptedid.php b/tests/bin/encryptedid.php index 79ac81228..e4060f818 100644 --- a/tests/bin/encryptedid.php +++ b/tests/bin/encryptedid.php @@ -17,7 +17,7 @@ $encryptor = (new KeyTransportAlgorithmFactory())->getAlgorithm( C::KEY_TRANSPORT_OAEP, - PEMCertificatesMock::getPublicKey(PEMCertificatesMock::SELFSIGNED_PUBLIC_KEY) + PEMCertificatesMock::getPublicKey(PEMCertificatesMock::SELFSIGNED_PUBLIC_KEY), ); $nid = new NameID('very secret'); $eid = new EncryptedID($nid->encrypt($encryptor)); diff --git a/tests/bin/logoutrequest.php b/tests/bin/logoutrequest.php index e3b913c65..addb3c341 100644 --- a/tests/bin/logoutrequest.php +++ b/tests/bin/logoutrequest.php @@ -22,7 +22,7 @@ $encryptor = (new KeyTransportAlgorithmFactory())->getAlgorithm( C::KEY_TRANSPORT_OAEP, - PEMCertificatesMock::getPublicKey(PEMCertificatesMock::SELFSIGNED_PUBLIC_KEY) + PEMCertificatesMock::getPublicKey(PEMCertificatesMock::SELFSIGNED_PUBLIC_KEY), ); $nid = new NameID('very secret'); $eid = new EncryptedID($nid->encrypt($encryptor)); @@ -31,7 +31,7 @@ identifier: $eid, issueInstant: new DateTimeImmutable('now', new DateTimeZone('Z')), sessionIndexes: [new SessionIndex('SomeSessionIndex1'), new SessionIndex('SomeSessionIndex2')], - issuer: new Issuer('urn:test:TheIssuer') + issuer: new Issuer('urn:test:TheIssuer'), ); $logoutRequest = $logoutRequest->toXML();