Laravel version update

Laravel version update
This commit is contained in:
Manish Verma
2018-08-06 18:48:58 +05:30
parent d143048413
commit 126fbb0255
13678 changed files with 1031482 additions and 778530 deletions

View File

@@ -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,12 +10,20 @@
namespace SebastianBergmann\Comparator;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass SebastianBergmann\Comparator\ArrayComparator
*
* @uses SebastianBergmann\Comparator\Comparator
* @uses SebastianBergmann\Comparator\Factory
* @uses SebastianBergmann\Comparator\ComparisonFailure
*/
class ArrayComparatorTest extends \PHPUnit_Framework_TestCase
class ArrayComparatorTest extends TestCase
{
/**
* @var ArrayComparator
*/
private $comparator;
protected function setUp()
@@ -26,87 +34,87 @@ class ArrayComparatorTest extends \PHPUnit_Framework_TestCase
public function acceptsFailsProvider()
{
return array(
array(array(), null),
array(null, array()),
array(null, null)
);
return [
[[], null],
[null, []],
[null, null]
];
}
public function assertEqualsSucceedsProvider()
{
return array(
array(
array('a' => 1, 'b' => 2),
array('b' => 2, 'a' => 1)
),
array(
array(1),
array('1')
),
array(
array(3, 2, 1),
array(2, 3, 1),
return [
[
['a' => 1, 'b' => 2],
['b' => 2, 'a' => 1]
],
[
[1],
['1']
],
[
[3, 2, 1],
[2, 3, 1],
0,
true
),
array(
array(2.3),
array(2.5),
],
[
[2.3],
[2.5],
0.5
),
array(
array(array(2.3)),
array(array(2.5)),
],
[
[[2.3]],
[[2.5]],
0.5
),
array(
array(new Struct(2.3)),
array(new Struct(2.5)),
],
[
[new Struct(2.3)],
[new Struct(2.5)],
0.5
),
);
],
];
}
public function assertEqualsFailsProvider()
{
return array(
array(
array(),
array(0 => 1)
),
array(
array(0 => 1),
array()
),
array(
array(0 => null),
array()
),
array(
array(0 => 1, 1 => 2),
array(0 => 1, 1 => 3)
),
array(
array('a', 'b' => array(1, 2)),
array('a', 'b' => array(2, 1))
),
array(
array(2.3),
array(4.2),
return [
[
[],
[0 => 1]
],
[
[0 => 1],
[]
],
[
[0 => null],
[]
],
[
[0 => 1, 1 => 2],
[0 => 1, 1 => 3]
],
[
['a', 'b' => [1, 2]],
['a', 'b' => [2, 1]]
],
[
[2.3],
[4.2],
0.5
),
array(
array(array(2.3)),
array(array(4.2)),
],
[
[[2.3]],
[[4.2]],
0.5
),
array(
array(new Struct(2.3)),
array(new Struct(4.2)),
],
[
[new Struct(2.3)],
[new Struct(4.2)],
0.5
)
);
]
];
}
/**
@@ -115,7 +123,7 @@ class ArrayComparatorTest extends \PHPUnit_Framework_TestCase
public function testAcceptsSucceeds()
{
$this->assertTrue(
$this->comparator->accepts(array(), array())
$this->comparator->accepts([], [])
);
}
@@ -140,9 +148,7 @@ class ArrayComparatorTest extends \PHPUnit_Framework_TestCase
try {
$this->comparator->assertEquals($expected, $actual, $delta, $canonicalize);
}
catch (ComparisonFailure $exception) {
} catch (ComparisonFailure $exception) {
}
$this->assertNull($exception, 'Unexpected ComparisonFailure');
@@ -152,12 +158,11 @@ class ArrayComparatorTest extends \PHPUnit_Framework_TestCase
* @covers ::assertEquals
* @dataProvider assertEqualsFailsProvider
*/
public function testAssertEqualsFails($expected, $actual,$delta = 0.0, $canonicalize = false)
public function testAssertEqualsFails($expected, $actual, $delta = 0.0, $canonicalize = false)
{
$this->setExpectedException(
'SebastianBergmann\\Comparator\\ComparisonFailure',
'Failed asserting that two arrays are equal'
);
$this->expectException(ComparisonFailure::class);
$this->expectExceptionMessage('Failed asserting that two arrays are equal');
$this->comparator->assertEquals($expected, $actual, $delta, $canonicalize);
}
}