diff --git a/.coveralls.yml b/.coveralls.yml index 173ff356..f5cff9ef 100644 --- a/.coveralls.yml +++ b/.coveralls.yml @@ -1,6 +1,6 @@ -service_name: travis-ci +service_name: github -src_dir: lib +src_dir: src coverage_clover: tests/build/logs/clover.xml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c6a00fcc..00000000 --- a/.travis.yml +++ /dev/null @@ -1,28 +0,0 @@ -language: php -dist: bionic -php: - - 7.3 - - 7.4 - - 8.0 - -before_install: - - composer self-update || true - - composer install --prefer-source --no-interaction - -before_script: - - phpenv config-rm xdebug.ini - - export XDEBUG_MODE=coverage - -script: - - vendor/bin/phpunit - - php vendor/bin/phpcpd --exclude tests --exclude vendor . - - php vendor/bin/phploc src/. - - mkdir -p tests/build/dependences - - php vendor/bin/pdepend --summary-xml=tests/build/logs/dependence-summary.xml --jdepend-chart=tests/build/dependences/jdepend.svg --overview-pyramid=tests/build/dependences/pyramid.svg src/. - - php vendor/bin/phpcs --standard=tests/ZendModStandard src/Saml2 demo1 demo2 endpoints tests/src - -after_script: - - export TRAVIS=https://travis-ci.org/onelogin/php-saml - - echo $TRAVIS - - echo $TRAVIS_JOB_ID - - php vendor/bin/coveralls --config .coveralls.yml -v diff --git a/tests/src/OneLogin/Saml2/ResponseTest.php b/tests/src/OneLogin/Saml2/ResponseTest.php index 4db0ffe7..0908591a 100644 --- a/tests/src/OneLogin/Saml2/ResponseTest.php +++ b/tests/src/OneLogin/Saml2/ResponseTest.php @@ -1607,10 +1607,12 @@ public function testIsInValidCert() $response = new Response($settings, $xml); - $this->assertFalse($response->isValid()); + $this->assertFalse(@$response->isValid()); + $possibleErrors = [ "openssl_x509_read(): supplied parameter cannot be coerced into an X509 certificate!", - "openssl_x509_read(): X.509 Certificate cannot be retrieved" + "openssl_x509_read(): X.509 Certificate cannot be retrieved", + "Unable to extract public key" ]; $this->assertTrue(in_array($response->getError(), $possibleErrors)); } diff --git a/tests/src/OneLogin/Saml2/SettingsTest.php b/tests/src/OneLogin/Saml2/SettingsTest.php index 64e0c3e1..6ca43894 100644 --- a/tests/src/OneLogin/Saml2/SettingsTest.php +++ b/tests/src/OneLogin/Saml2/SettingsTest.php @@ -271,7 +271,7 @@ public function testThatOnlyBooleansCanBeUsedForCompressionSettings($invalidValu $this->assertTrue($responsesIsInvalid); } - public function invalidCompressSettingsProvider() + static public function invalidCompressSettingsProvider() { return array( array(1), @@ -539,7 +539,7 @@ public function testGetSPMetadataWithX509CertNew($alwaysIncludeEncryption, $want $this->assertEquals($expectEncryptionKeyDescriptor ? 2 : 0, substr_count($metadata, ' [