Skip to content

Commit

Permalink
Fix coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
renekorss committed Oct 2, 2019
1 parent ae6c855 commit 27b8bd0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[{bower.json,package.json,composer.json,karma.conf.js,CONTRIBUTING.md,.travis.yml}]
[{bower.json,package.json,composer.json,karma.conf.js,CONTRIBUTING.md,.travis.yml,*.yml}]
indent_size = 2

[*.md]
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,21 @@ jobs:
php-version: ${{ matrix.php-versions }}
coverage: xdebug
- name: Install dependencies
run: composer install --prefer-dist --no-interaction $COMPOSER_ARGS
if: matrix.php-versions != '7.4'
run: composer install --prefer-dist --no-interaction
- name: Install dependencies
if: matrix.php-versions == '7.4'
run: composer install --prefer-dist --no-interaction --ignore-platform-reqs
- name: PHP Code Sniffer
if: matrix.php-versions == '7.2'
run: vendor/bin/phpcs --report=full --extensions=php -p --standard=phpcs.xml ./src ./tests
- name: PHP Mess Detector
if: matrix.php-versions == '7.2'
run: vendor/bin/phpmd ./src text phpmd.xml
- name: PHP Unit Tests
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml
- name: Send to coveralls
run: php vendor/bin/php-coveralls -v
env:
COVERALLS_RUN_LOCALLY: 1
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
12 changes: 12 additions & 0 deletions tests/EE/EstcardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,18 @@ public function testGetPaymentRequest()
$this->assertEquals($this->requestUrl, $request->getRequestUrl());
}

/**
* Test for correctly generated request data.
*/
public function testGetPaymentRequestWithoutMessage()
{
$request = $this->bank->getPaymentRequest($this->orderId, $this->amount, '', $this->language, $this->currency, [], $this->timezone);

unset($this->expectedData['additionalinfo']);
$this->expectedData['mac'] = 'aaacb942dd3512d915224d244c20862457284e72587057d182ee1ee1b6da1082b43632cf9a9138144f52b48edc6fe8cdeb2193320f7a651c670c3550c92ae619c8fd33713f313d8c88241ec8322c78831bb818715eee3584ed612891ea4ce7a31398d280aa7b878907a7f6a2915629a4d369ddd2b1c0b56ad8dec19f5fafb35f';
$this->assertEquals($this->expectedData, $request->getRequestData());
}

/**
* Test successful payment response.
*/
Expand Down

0 comments on commit 27b8bd0

Please sign in to comment.