Skip to content

Commit

Permalink
Fix cleanup-job
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Jun 13, 2024
1 parent 23ba31d commit d827f2d
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/SAML2/CustomRoleDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public function __construct(
array $keyDescriptor = [],
?Organization $organization = null,
array $contact = [],
array $namespacedAttributes = []
array $namespacedAttributes = [],
) {
Assert::allIsInstanceOf($chunk, Chunk::class);

Expand Down Expand Up @@ -112,7 +112,7 @@ public static function fromXML(DOMElement $xml): static
Assert::true(
$xml->hasAttributeNS(C::NS_XSI, 'type'),
'Missing required xsi:type in <saml:RoleDescriptor> element.',
InvalidDOMElementException::class
InvalidDOMElementException::class,
);

$type = $xml->getAttributeNS(C::NS_XSI, 'type');
Expand Down
2 changes: 1 addition & 1 deletion tests/SAML2/Response/SignatureValidationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
9 changes: 3 additions & 6 deletions tests/SAML2/SOAPTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ public function testRequestParsing(): void
</samlp:ArtifactResolve>
</env:Body>
</env:Envelope>
SOAP
);
SOAP);

$request = new ServerRequest('', '');
$message = $stub->receive($request);
Expand All @@ -85,8 +84,7 @@ public function testSendArtifactResponse(): void
$doc = DOMDocumentFactory::fromString(<<<SOAP
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Body /></env:Envelope>
SOAP
);
SOAP);

/** @var \DOMElement $body */
$body = $doc->getElementsByTagNameNS(C::NS_SOAP_ENV_11, 'Body')->item(0);
Expand All @@ -111,8 +109,7 @@ public function testSendResponse(): void
$doc = DOMDocumentFactory::fromString(<<<SOAP
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"><env:Header /><env:Body /></env:Envelope>
SOAP
);
SOAP);
$requestAuthenticated = new RequestAuthenticated(true);
$ecpResponse = new Response('https://example.org/metadata');

Expand Down
2 changes: 1 addition & 1 deletion tests/bin/encryptedassertion.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
2 changes: 1 addition & 1 deletion tests/bin/encryptedattribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion tests/bin/encryptedid.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
4 changes: 2 additions & 2 deletions tests/bin/logoutrequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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();
Expand Down

0 comments on commit d827f2d

Please sign in to comment.