Skip to content

Commit fa7621e

Browse files
committed
Fix warnings found running php8.4 and PHPUnit 11.5.0
1 parent cace752 commit fa7621e

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

tests/src/OneLogin/Saml2/ResponseTest.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -1607,10 +1607,12 @@ public function testIsInValidCert()
16071607

16081608
$response = new Response($settings, $xml);
16091609

1610-
$this->assertFalse($response->isValid());
1610+
$this->assertFalse(@$response->isValid());
1611+
16111612
$possibleErrors = [
16121613
"openssl_x509_read(): supplied parameter cannot be coerced into an X509 certificate!",
1613-
"openssl_x509_read(): X.509 Certificate cannot be retrieved"
1614+
"openssl_x509_read(): X.509 Certificate cannot be retrieved",
1615+
"Unable to extract public key"
16141616
];
16151617
$this->assertTrue(in_array($response->getError(), $possibleErrors));
16161618
}

tests/src/OneLogin/Saml2/SettingsTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ public function testThatOnlyBooleansCanBeUsedForCompressionSettings($invalidValu
271271
$this->assertTrue($responsesIsInvalid);
272272
}
273273

274-
public function invalidCompressSettingsProvider()
274+
static public function invalidCompressSettingsProvider()
275275
{
276276
return array(
277277
array(1),
@@ -539,7 +539,7 @@ public function testGetSPMetadataWithX509CertNew($alwaysIncludeEncryption, $want
539539
$this->assertEquals($expectEncryptionKeyDescriptor ? 2 : 0, substr_count($metadata, '<md:KeyDescriptor use="encryption"'));
540540
}
541541

542-
public function getSPMetadataWithX509CertNewDataProvider()
542+
static public function getSPMetadataWithX509CertNewDataProvider()
543543
{
544544
return [
545545
'settings do not require encryption' => [

0 commit comments

Comments
 (0)