Skip to content

Commit

Permalink
Merge pull request #31 from moovaio/laravel-6
Browse files Browse the repository at this point in the history
feat(dependencies) Add Laravel 6 support
  • Loading branch information
esbenp authored Oct 31, 2020
2 parents 6cb406b + b4570c5 commit 3671e10
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 23 deletions.
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
]
},
"require": {
"laravel/framework": "~5.3"
"laravel/framework": "~6.0"
},
"require-dev": {
"mockery/mockery": "0.9.*",
"orchestra/testbench": "~3.1",
"phpunit/phpunit": "~4.7",
"satooshi/php-coveralls": "dev-master@dev",
"mockery/mockery": "1.3.*",
"orchestra/testbench": "4.*",
"phpunit/phpunit": "~8.0",
"php-coveralls/php-coveralls": "2.2.*",
"bugsnag/bugsnag-laravel": "^2.4"
},
"suggest": {
Expand Down
3 changes: 1 addition & 2 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false">
stopOnFailure="false">
<logging>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
Expand Down
21 changes: 9 additions & 12 deletions tests/ExceptionHandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function format(JsonResponse $response, Exception $e, array $reporterResp

class ExceptionHandlerTest extends TestCase {

public function setUp()
public function setUp() :void
{
parent::setUp();

Expand Down Expand Up @@ -124,10 +124,9 @@ public function testReportInvalidReporterClass()

$property->setValue($handler, $config);

$this->setExpectedException(
\InvalidArgumentException::class,
'invalid: stdClass is not a valid reporter class.'
);
$this->expectException(\InvalidArgumentException::class);

$this->expectExceptionMessage('invalid: stdClass is not a valid reporter class.');

$reflectionHandler->getMethod('report')
->invoke($handler, $exception);
Expand Down Expand Up @@ -156,13 +155,11 @@ public function testInvalidFormatterClass()

$property->setValue($handler, $config);

$this->setExpectedException(
\InvalidArgumentException::class,
sprintf(
"% is not a valid formatter class.",
get_class($formatter)
)
);
$this->expectException(\InvalidArgumentException::class);

$exceptionMessage = sprintf("% is not a valid formatter class.", get_class($formatter));

$this->expectExceptionMessage($exceptionMessage);

$method = $reflectionHandler->getMethod('generateExceptionResponse');

Expand Down
2 changes: 1 addition & 1 deletion tests/Formatters/ExceptionFormatterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
class ExceptionFormatterTest extends TestCase
{

public function setUp()
public function setUp() :void
{
parent::setUp();

Expand Down
6 changes: 3 additions & 3 deletions tests/Reporters/BugsnagReporterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ class BugsnagReporterTest extends TestCase

protected $client;

public function setUp()
public function setUp() :void
{
parent::setUp();

$this->client = $this->getMockBuilder(stdClass::class)
->setMethods(['notifyException'])
->getMock();

$this->app->instance(Client::class, $this->client);

$this->bugsnagReporter = new BugsnagReporter([]);
}

Expand Down

0 comments on commit 3671e10

Please sign in to comment.