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>
*
@@ -12,12 +12,16 @@ namespace SebastianBergmann\Comparator;
use \Exception;
use \RuntimeException;
use PHPUnit\Framework\TestCase;
/**
* @coversDefaultClass SebastianBergmann\Comparator\ExceptionComparator
*
* @uses SebastianBergmann\Comparator\Comparator
* @uses SebastianBergmann\Comparator\Factory
* @uses SebastianBergmann\Comparator\ComparisonFailure
*/
class ExceptionComparatorTest extends \PHPUnit_Framework_TestCase
class ExceptionComparatorTest extends TestCase
{
private $comparator;
@@ -29,20 +33,20 @@ class ExceptionComparatorTest extends \PHPUnit_Framework_TestCase
public function acceptsSucceedsProvider()
{
return array(
array(new Exception, new Exception),
array(new RuntimeException, new RuntimeException),
array(new Exception, new RuntimeException)
);
return [
[new Exception, new Exception],
[new RuntimeException, new RuntimeException],
[new Exception, new RuntimeException]
];
}
public function acceptsFailsProvider()
{
return array(
array(new Exception, null),
array(null, new Exception),
array(null, null)
);
return [
[new Exception, null],
[null, new Exception],
[null, null]
];
}
public function assertEqualsSucceedsProvider()
@@ -50,36 +54,36 @@ class ExceptionComparatorTest extends \PHPUnit_Framework_TestCase
$exception1 = new Exception;
$exception2 = new Exception;
$exception3 = new RunTimeException('Error', 100);
$exception4 = new RunTimeException('Error', 100);
$exception3 = new RuntimeException('Error', 100);
$exception4 = new RuntimeException('Error', 100);
return array(
array($exception1, $exception1),
array($exception1, $exception2),
array($exception3, $exception3),
array($exception3, $exception4)
);
return [
[$exception1, $exception1],
[$exception1, $exception2],
[$exception3, $exception3],
[$exception3, $exception4]
];
}
public function assertEqualsFailsProvider()
{
$typeMessage = 'not instance of expected class';
$typeMessage = 'not instance of expected class';
$equalMessage = 'Failed asserting that two objects are equal.';
$exception1 = new Exception('Error', 100);
$exception2 = new Exception('Error', 101);
$exception3 = new Exception('Errors', 101);
$exception4 = new RunTimeException('Error', 100);
$exception5 = new RunTimeException('Error', 101);
$exception4 = new RuntimeException('Error', 100);
$exception5 = new RuntimeException('Error', 101);
return array(
array($exception1, $exception2, $equalMessage),
array($exception1, $exception3, $equalMessage),
array($exception1, $exception4, $typeMessage),
array($exception2, $exception3, $equalMessage),
array($exception4, $exception5, $equalMessage)
);
return [
[$exception1, $exception2, $equalMessage],
[$exception1, $exception3, $equalMessage],
[$exception1, $exception4, $typeMessage],
[$exception2, $exception3, $equalMessage],
[$exception4, $exception5, $equalMessage]
];
}
/**
@@ -114,9 +118,7 @@ class ExceptionComparatorTest extends \PHPUnit_Framework_TestCase
try {
$this->comparator->assertEquals($expected, $actual);
}
catch (ComparisonFailure $exception) {
} catch (ComparisonFailure $exception) {
}
$this->assertNull($exception, 'Unexpected ComparisonFailure');
@@ -128,9 +130,9 @@ class ExceptionComparatorTest extends \PHPUnit_Framework_TestCase
*/
public function testAssertEqualsFails($expected, $actual, $message)
{
$this->setExpectedException(
'SebastianBergmann\\Comparator\\ComparisonFailure', $message
);
$this->expectException(ComparisonFailure::class);
$this->expectExceptionMessage($message);
$this->comparator->assertEquals($expected, $actual);
}
}