diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2b5eb81..f93e18e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ name: CI on: [push, pull_request] jobs: - build-test-71: + build-test-74: runs-on: ubuntu-latest steps: @@ -11,17 +11,18 @@ jobs: - uses: php-actions/composer@v6 with: - version: 1 - php_version: "7.1" + version: 2 + php_version: "7.4" - name: PHPUnit Tests uses: php-actions/phpunit@v3 with: - version: 7 - php_version: "7.1" + version: 9 + php_version: "7.4" configuration: phpunit.xml.dist bootstrap: vendor/autoload.php - build-test-74: + + build-test-81: runs-on: ubuntu-latest steps: @@ -30,12 +31,12 @@ jobs: - uses: php-actions/composer@v6 with: version: 2 - php_version: "7.4" + php_version: "8.1" - name: PHPUnit Tests uses: php-actions/phpunit@v3 with: - version: 7 - php_version: "7.4" + version: 9 + php_version: "8.1" configuration: phpunit.xml.dist bootstrap: vendor/autoload.php diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100755 index 908e66f..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,16 +0,0 @@ -cache: - paths: - - vendor/ - -before_script: -- apt-get update -- apt-get install -y zlib1g-dev -- docker-php-ext-install zip -- curl -sS https://getcomposer.org/installer | php -- php composer.phar install --prefer-dist --no-progress --no-interaction - -test:7.2: - image: php:7.2 - script: - - php composer.phar test - diff --git a/.travis.yml b/.travis.yml deleted file mode 100755 index a2914bd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: php - -php: - - '5.5' - - '5.6' - - '7.0' - - hhvm - - nightly - -cache: - directories: - - $HOME/.composer/cache - -git: - depth: 1 - -before_install: - - travis_retry composer self-update - -install: - - travis_retry composer update - -script: - - composer run-script phplint - - vendor/bin/phpunit --coverage-text diff --git a/Action/Api/ConvertGiropayErrorsAction.php b/Action/Api/ConvertGiropayErrorsAction.php index 945abfa..6d67d1c 100644 --- a/Action/Api/ConvertGiropayErrorsAction.php +++ b/Action/Api/ConvertGiropayErrorsAction.php @@ -36,7 +36,7 @@ public function execute($request) $response = $request->getResponse(); if (Api::STATUS_ERROR != $response[Api::FIELD_STATUS] - || !array_key_exists(Api::FIELD_PAYMENT_METHOD, $model) + || !$model[Api::FIELD_PAYMENT_METHOD] || $model[Api::FIELD_PAYMENT_METHOD] != Api::PAYMENT_METHOD_GIROPAY ) { return; diff --git a/Tests/Action/Api/GetSepaMandatePdfActionTest.php b/Tests/Action/Api/GetSepaMandatePdfActionTest.php index 96221e8..0817ff5 100755 --- a/Tests/Action/Api/GetSepaMandatePdfActionTest.php +++ b/Tests/Action/Api/GetSepaMandatePdfActionTest.php @@ -2,10 +2,7 @@ namespace Valiton\Payum\Payone\Tests\Action\Api; -use GuzzleHttp\Client; -use Payum\Core\Bridge\Guzzle\HttpClient; use Valiton\Payum\Payone\Action\Api\GetSepaMandatePdfAction; -use Valiton\Payum\Payone\Api; use Valiton\Payum\Payone\Request\Api\GetSepaMandatePdf; use Valiton\Payum\Payone\Tests\Action\AbstractActionTest; diff --git a/Tests/ApiTest.php b/Tests/ApiTest.php index 7ec2f34..04a124b 100755 --- a/Tests/ApiTest.php +++ b/Tests/ApiTest.php @@ -7,9 +7,8 @@ use Payum\Core\Bridge\Guzzle\HttpClient; use Payum\Core\HttpClientInterface; use Payum\Core\Tests\TestCase; +use PHPUnit\Framework\MockObject\MockObject; use Psr\Http\Message\RequestInterface; -use Psr\Http\Message\ResponseInterface; -use Psr\Http\Message\StreamInterface; use Valiton\Payum\Payone\Api; class ApiTest extends TestCase @@ -96,7 +95,7 @@ public function testDecodeBodyHandlesNewlineInMandateText() Api::FIELD_LAST_NAME => 'Mustermann', ]); - $this->assertInternalType('array', $response); + $this->assertIsArray($response); $this->assertArrayHasKey(Api::FIELD_MANDATE_TEXT, $response); $this->assertStringStartsWith('