forked from paysera/lib-money
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Drop support for PHP 5.6 (paysera#24)
* Drop support for PHP 5.6 * Update PHPUnit version
- Loading branch information
1 parent
6626e92
commit 040fa82
Showing
9 changed files
with
127 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ vendor/ | |
build/ | ||
bin/ | ||
composer.lock | ||
/.phpunit.result.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- http://www.phpunit.de/manual/current/en/appendixes.configuration.html --> | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.8/phpunit.xsd" | ||
backupGlobals = "false" | ||
backupStaticAttributes = "false" | ||
colors = "true" | ||
convertErrorsToExceptions = "true" | ||
convertNoticesToExceptions = "true" | ||
convertWarningsToExceptions = "true" | ||
processIsolation = "false" | ||
stopOnFailure = "false" | ||
bootstrap = "vendor/autoload.php" > | ||
|
||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd" | ||
bootstrap="tests/bootstrap.php" | ||
colors="true"> | ||
<testsuites> | ||
<testsuite name="Project Test Suite"> | ||
<testsuite name="Money Test Suite"> | ||
<directory>tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<coverage processUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
</coverage> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?php | ||
|
||
namespace Evp\Component\Money\Tests; | ||
|
||
use Evp\Component\Money\Money; | ||
use SebastianBergmann\Comparator\Comparator; | ||
use SebastianBergmann\Comparator\ComparisonFailure; | ||
|
||
class MoneyComparator extends Comparator | ||
{ | ||
|
||
public function accepts($expected, $actual) | ||
{ | ||
return $expected instanceof Money && $actual instanceof Money; | ||
} | ||
|
||
public function assertEquals($expected, $actual, $delta = 0.0, $canonicalize = false, $ignoreCase = false) | ||
{ | ||
assert($expected instanceof Money); | ||
assert($actual instanceof Money); | ||
|
||
if (!$expected->isEqual($actual)) { | ||
throw new ComparisonFailure( | ||
$expected, | ||
$actual, | ||
$expected->getAsString(), | ||
$actual->getAsString(), | ||
false, | ||
'Failed asserting that two Money objects are equal.' | ||
); | ||
} | ||
} | ||
} |
Oops, something went wrong.