Skip to content

Commit

Permalink
Merge pull request #32 from logeecom/hotfix/unit-tests
Browse files Browse the repository at this point in the history
Fix unit tests and release 2.0.11
  • Loading branch information
yovendielmundo authored May 25, 2020
2 parents 426d33f + 44fd22d commit 04765db
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

## [2.0.10](https://github.com/packlink-dev/ecommerce_module_core/compare/v2.0.9...v2.0.10)
## Unreleased

## [2.0.11](https://github.com/packlink-dev/ecommerce_module_core/compare/v2.0.10...v2.0.11) - 2020-05-25
### Changed
- Fixed unit tests

## [2.0.10](https://github.com/packlink-dev/ecommerce_module_core/compare/v2.0.9...v2.0.10) - 2020-05-20
### Added
- Added configuration flag for async request progress callback usage (methods
`Configuration::isAsyncRequestWithProgress` and `Configuration::setAsyncRequestWithProgress`)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,12 @@ public function testInvalidRegistrationLegalPolicy()
$errors = $e->getValidationErrors();
self::assertCount(2, $errors);

$errorCodes = array_map(create_function('$error', 'return $error->field;'), $errors);
$errorCodes = array_map(
function ($error) {
return $error->field;
},
$errors
);

self::assertArraySubset(array('data_processing', 'terms_and_conditions'), $errorCodes);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ private function checkIfValidationExceptionIsThrown($request, $field)
$errors = $e->getValidationErrors();
self::assertCount(1, $errors);

$errorCodes = array_map(create_function('$error', 'return $error->field;'), $errors);
$errorCodes = array_map(
function ($error) {
return $error->field;
},
$errors
);

self::assertArraySubset(array($field), $errorCodes);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Infrastructure/Http/CurlHttpClientTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ private function assertProgressCallback($isOn = true)
'Curl progress callback should be set for async call.'
);
$this->assertFalse(
$curlOptions[CURLOPT_NOPROGRESS],
(bool)$curlOptions[CURLOPT_NOPROGRESS],
'Curl progress callback should be set for async call.'
);
$this->assertTrue(
Expand Down

0 comments on commit 04765db

Please sign in to comment.