From 5f8124811f95e31c1bc44b5999083b381b9d8c82 Mon Sep 17 00:00:00 2001 From: Unknown Date: Thu, 7 Sep 2017 15:32:36 +0100 Subject: [PATCH] Updating the package for Laravel 5.5 --- .scrutinizer.yml | 2 +- .travis.yml | 1 - composer.json | 14 +++++++------- tests/Feature/MediaApiTest.php | 13 +++++-------- 4 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.scrutinizer.yml b/.scrutinizer.yml index 282131b..d44a72f 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -22,7 +22,7 @@ checks: tools: external_code_coverage: timeout: 600 - runs: 3 + runs: 2 php_code_sniffer: enabled: true config: diff --git a/.travis.yml b/.travis.yml index a4500e0..f16602e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ language: php sudo: false php: - - 5.6 - 7.0 - 7.1 - nightly diff --git a/composer.json b/composer.json index 8154d1f..6fa6f86 100644 --- a/composer.json +++ b/composer.json @@ -16,16 +16,16 @@ "type": "library", "license": "MIT", "require": { - "php": ">=5.6.4", - "arcanesoft/auth": "~3.0.0", - "arcanesoft/core": "~2.6.0" + "php": ">=7.0", + "arcanesoft/auth": "~3.1.0", + "arcanesoft/core": "~2.7.0" }, "require-dev": { - "arcanesoft/foundation": "~2.3.0", - "phpunit/phpcov": "~3.0", - "phpunit/phpunit": "~5.0", + "arcanesoft/foundation": "~2.4.0", + "phpunit/phpcov": "~4.0", + "phpunit/phpunit": "~6.0", "mockery/mockery": "~0.9.0", - "orchestra/testbench-browser-kit": "~3.4.0" + "orchestra/testbench-browser-kit": "~3.5.0" }, "autoload": { "psr-4": { diff --git a/tests/Feature/MediaApiTest.php b/tests/Feature/MediaApiTest.php index 1418387..70d2aa9 100644 --- a/tests/Feature/MediaApiTest.php +++ b/tests/Feature/MediaApiTest.php @@ -83,18 +83,15 @@ public function it_can_get_all_with_a_location() ]); } - /** - * @test - * - * @expectedException \Illuminate\Auth\Access\AuthorizationException - * @expectedExceptionMessage [Unauthorized] You are not allowed to perform this action. - * @expectedExceptionCode 403 - */ + /** @test */ public function it_must_block_access_on_get_all() { $this->beUser(); - $this->getJson(route('admin::media.api.get'))->json(); + $response = $this->getJson(route('admin::media.api.get')); + + $response->assertStatus(403); + $response->assertJsonFragment(['message' => '[Unauthorized] You are not allowed to perform this action.']); } /** @test */