Skip to content

Commit 14a91d0

Browse files
committed
add support for laravel 5.5
1 parent c7fe361 commit 14a91d0

File tree

6 files changed

+21
-10
lines changed

6 files changed

+21
-10
lines changed

.scrutinizer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ checks:
88
build:
99
environment:
1010
php:
11-
version: 5.6
11+
version: 7.1
1212
tests:
1313
override:
1414
-

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
language: php
22

33
php:
4-
- 5.6
54
- 7.0
65
- 7.1
76
- 7.2
@@ -14,4 +13,4 @@ before_script:
1413
- curl -s http://getcomposer.org/installer | php
1514
- php composer.phar install --dev
1615

17-
script: phpunit --configuration phpunit.travis.xml --coverage-text
16+
script: ./vendor/bin/phpunit --configuration phpunit.travis.xml --coverage-text

composer.json

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,27 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=5.5.9",
13+
"php": ">=7.0",
1414
"zendframework/zend-permissions-acl": "2.6.*",
15-
"illuminate/support": "5.*"
15+
"illuminate/support": "5.5.*"
1616
},
1717
"require-dev": {
18-
"phpunit/phpunit": "~5.0",
19-
"mockery/mockery": "~0.9.7"
18+
"phpunit/phpunit": "~6.0",
19+
"mockery/mockery": "~0.9.9"
2020
},
2121
"autoload": {
2222
"psr-4": {
2323
"Spekkionu\\ZendAcl\\": "src/Spekkionu/ZendAcl"
2424
}
25+
},
26+
"extra": {
27+
"laravel": {
28+
"providers": [
29+
"Spekkionu\\ZendAcl\\ZendAclServiceProvider"
30+
],
31+
"aliases": {
32+
"Acl": "Spekkionu\\ZendAcl\\Facades\\Acl"
33+
}
34+
}
2535
}
2636
}

phpunit.travis.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
convertErrorsToExceptions="true"
77
convertNoticesToExceptions="true"
88
convertWarningsToExceptions="true"
9+
beStrictAboutTestsThatDoNotTestAnything="false"
910
processIsolation="false"
1011
stopOnFailure="false"
1112
syntaxCheck="false"

phpunit.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
convertErrorsToExceptions="true"
77
convertNoticesToExceptions="true"
88
convertWarningsToExceptions="true"
9+
beStrictAboutTestsThatDoNotTestAnything="false"
910
processIsolation="false"
1011
stopOnFailure="false"
1112
syntaxCheck="false"

tests/AclRouteMiddlewareTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php namespace Spekkionu\ZendAcl;
22

3-
use PHPUnit_Framework_TestCase;
3+
use PHPUnit\Framework\TestCase;
44
use Spekkionu\ZendAcl\AclMiddleware;
55
use \Mockery as m;
66
use Closure;
@@ -17,7 +17,7 @@ function response($body = null, $status = null) {
1717
return AclRouteMiddlewareTest::$functions->response($body, $status);
1818
}
1919

20-
class AclRouteMiddlewareTest extends PHPUnit_Framework_TestCase
20+
class AclRouteMiddlewareTest extends TestCase
2121
{
2222

2323
public static $functions;
@@ -47,7 +47,7 @@ public function testFilter()
4747
$acl->shouldReceive('isAllowed')->once()->with('member', $resource, $permission)->andReturn(true);
4848

4949
$closure = function($request){};
50-
50+
5151
$request = m::mock('Illuminate\Http\Request');
5252

5353
$filter = new AclMiddleware($auth, $acl, $config);

0 commit comments

Comments
 (0)