From 4a43522c898d89c32e73291ed7134423f8f9ef8e Mon Sep 17 00:00:00 2001 From: Jose Luis Fonseca Date: Fri, 26 Apr 2019 06:22:21 -0500 Subject: [PATCH] Compatibility with Laravel 5.8 --- .gitignore | 3 ++- composer.json | 8 ++++---- tests/TestCase.php | 2 +- tests/Traits/FilterableTraitTest.php | 4 ++-- tests/Traits/OrderableTraitTest.php | 4 ++-- tests/Traits/ProcessMultipleParameterHelperTest.php | 2 +- tests/Traits/UuidScopeTraitTest.php | 2 +- 7 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index e66997d..6158c6b 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ composer.phar composer.lock /nbproject /site -/build \ No newline at end of file +/build +.idea/ \ No newline at end of file diff --git a/composer.json b/composer.json index fbeb899..91b088d 100644 --- a/composer.json +++ b/composer.json @@ -11,12 +11,12 @@ "require": { "php": ">=7.1", "spatie/laravel-fractal": "5.4.*", - "dingo/api": "2.0.0-alpha2" + "dingo/api": "^2.2" }, "require-dev": { - "phpunit/phpunit": "^7.0", - "mockery/mockery": "0.9.*", - "orchestra/testbench": "^3.7", + "phpunit/phpunit": "^7.5", + "mockery/mockery": "^1.0", + "orchestra/testbench": "^3.8", "orchestra/database": "^3.5" }, "autoload": { diff --git a/tests/TestCase.php b/tests/TestCase.php index 30550a4..be0d6c9 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -32,7 +32,7 @@ protected function getPackageProviders($app) protected function getPackageAliases($app) { return [ - 'Uuid' => \Webpatser\Uuid\Uuid::class, + ]; } diff --git a/tests/Traits/FilterableTraitTest.php b/tests/Traits/FilterableTraitTest.php index 2c3f051..78b8f1e 100755 --- a/tests/Traits/FilterableTraitTest.php +++ b/tests/Traits/FilterableTraitTest.php @@ -12,7 +12,7 @@ class FilterableTraitTest extends TestCase { protected $_faker; - public function setUp() + public function setUp() : void { parent::setUp(); $this->_faker = Faker::create(); @@ -359,7 +359,7 @@ public function testAppliesOtherCustomOperatorToQuery() $model = Mockery::mock('ModelFake'); $model->shouldReceive('where') - ->with('name', '<>', $requestFields['name']) + ->with('name', '<=', $requestFields['name']) ->once() ->andReturn(Mockery::self()); diff --git a/tests/Traits/OrderableTraitTest.php b/tests/Traits/OrderableTraitTest.php index c3e3fa6..bc142a1 100755 --- a/tests/Traits/OrderableTraitTest.php +++ b/tests/Traits/OrderableTraitTest.php @@ -11,13 +11,13 @@ class OrderQueryResultHelperTest extends TestCase { protected $_faker; - protected function setUp() + public function setUp() : void { parent::setUp(); $this->_faker = Faker::create(); } - protected function tearDown() + protected function tearDown() : void { parent::tearDown(); Mockery::close(); diff --git a/tests/Traits/ProcessMultipleParameterHelperTest.php b/tests/Traits/ProcessMultipleParameterHelperTest.php index d8602c9..92c1523 100755 --- a/tests/Traits/ProcessMultipleParameterHelperTest.php +++ b/tests/Traits/ProcessMultipleParameterHelperTest.php @@ -10,7 +10,7 @@ class ProcessMultipleParameterHelperTest extends TestCase { protected $_faker; - protected function setUp() + public function setUp() : void { parent::setUp(); $this->_faker = Faker::create(); diff --git a/tests/Traits/UuidScopeTraitTest.php b/tests/Traits/UuidScopeTraitTest.php index c802a46..7a23388 100644 --- a/tests/Traits/UuidScopeTraitTest.php +++ b/tests/Traits/UuidScopeTraitTest.php @@ -11,7 +11,7 @@ class UuidScopeTraitTest extends TestCase /** * Run migrations for the tests */ - public function setUp() + public function setUp() : void { parent::setUp(); $this->artisan('migrate', ['--database' => 'testbench']);