Laravel version update
Laravel version update
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* This file is part of the Comparator package.
|
||||
* This file is part of sebastian/comparator.
|
||||
*
|
||||
* (c) Sebastian Bergmann <sebastian@phpunit.de>
|
||||
*
|
||||
@@ -10,11 +10,16 @@
|
||||
|
||||
namespace SebastianBergmann\Comparator;
|
||||
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
/**
|
||||
* @coversDefaultClass SebastianBergmann\Comparator\NumericComparator
|
||||
*
|
||||
* @uses SebastianBergmann\Comparator\Comparator
|
||||
* @uses SebastianBergmann\Comparator\Factory
|
||||
* @uses SebastianBergmann\Comparator\ComparisonFailure
|
||||
*/
|
||||
class NumericComparatorTest extends \PHPUnit_Framework_TestCase
|
||||
class NumericComparatorTest extends TestCase
|
||||
{
|
||||
private $comparator;
|
||||
|
||||
@@ -25,47 +30,47 @@ class NumericComparatorTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
public function acceptsSucceedsProvider()
|
||||
{
|
||||
return array(
|
||||
array(5, 10),
|
||||
array(8, '0'),
|
||||
array('10', 0),
|
||||
array(0x74c3b00c, 42),
|
||||
array(0755, 0777)
|
||||
);
|
||||
return [
|
||||
[5, 10],
|
||||
[8, '0'],
|
||||
['10', 0],
|
||||
[0x74c3b00c, 42],
|
||||
[0755, 0777]
|
||||
];
|
||||
}
|
||||
|
||||
public function acceptsFailsProvider()
|
||||
{
|
||||
return array(
|
||||
array('5', '10'),
|
||||
array(8, 5.0),
|
||||
array(5.0, 8),
|
||||
array(10, null),
|
||||
array(false, 12)
|
||||
);
|
||||
return [
|
||||
['5', '10'],
|
||||
[8, 5.0],
|
||||
[5.0, 8],
|
||||
[10, null],
|
||||
[false, 12]
|
||||
];
|
||||
}
|
||||
|
||||
public function assertEqualsSucceedsProvider()
|
||||
{
|
||||
return array(
|
||||
array(1337, 1337),
|
||||
array('1337', 1337),
|
||||
array(0x539, 1337),
|
||||
array(02471, 1337),
|
||||
array(1337, 1338, 1),
|
||||
array('1337', 1340, 5),
|
||||
);
|
||||
return [
|
||||
[1337, 1337],
|
||||
['1337', 1337],
|
||||
[0x539, 1337],
|
||||
[02471, 1337],
|
||||
[1337, 1338, 1],
|
||||
['1337', 1340, 5],
|
||||
];
|
||||
}
|
||||
|
||||
public function assertEqualsFailsProvider()
|
||||
{
|
||||
return array(
|
||||
array(1337, 1338),
|
||||
array('1338', 1337),
|
||||
array(0x539, 1338),
|
||||
array(1337, 1339, 1),
|
||||
array('1337', 1340, 2),
|
||||
);
|
||||
return [
|
||||
[1337, 1338],
|
||||
['1338', 1337],
|
||||
[0x539, 1338],
|
||||
[1337, 1339, 1],
|
||||
['1337', 1340, 2],
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -100,9 +105,7 @@ class NumericComparatorTest extends \PHPUnit_Framework_TestCase
|
||||
|
||||
try {
|
||||
$this->comparator->assertEquals($expected, $actual, $delta);
|
||||
}
|
||||
|
||||
catch (ComparisonFailure $exception) {
|
||||
} catch (ComparisonFailure $exception) {
|
||||
}
|
||||
|
||||
$this->assertNull($exception, 'Unexpected ComparisonFailure');
|
||||
@@ -114,9 +117,9 @@ class NumericComparatorTest extends \PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testAssertEqualsFails($expected, $actual, $delta = 0.0)
|
||||
{
|
||||
$this->setExpectedException(
|
||||
'SebastianBergmann\\Comparator\\ComparisonFailure', 'matches expected'
|
||||
);
|
||||
$this->expectException(ComparisonFailure::class);
|
||||
$this->expectExceptionMessage('matches expected');
|
||||
|
||||
$this->comparator->assertEquals($expected, $actual, $delta);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user