-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2f6f1f
commit 0042c2f
Showing
21 changed files
with
42 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,25 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit backupGlobals="false" | ||
backupStaticAttributes="false" | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd" | ||
bootstrap="vendor/autoload.php" | ||
colors="true" | ||
convertErrorsToExceptions="true" | ||
convertNoticesToExceptions="true" | ||
convertWarningsToExceptions="true" | ||
processIsolation="false" | ||
stopOnFailure="false" | ||
> | ||
> | ||
<testsuites> | ||
<testsuite name="Package Test Suite"> | ||
<directory suffix=".php">./tests/</directory> | ||
<directory suffix=".php">./tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<filter> | ||
<whitelist> | ||
<directory suffix=".php">./src/</directory> | ||
</whitelist> | ||
</filter> | ||
<coverage processUncoveredFiles="true"> | ||
<include> | ||
<directory suffix=".php">./src</directory> | ||
</include> | ||
<report> | ||
<clover outputFile="build/coverage/clover.xml"/> | ||
<html outputDirectory="build/coverage/html"/> | ||
<text outputFile="build/coverage/coverage.txt" showOnlySummary="true"/> | ||
</report> | ||
</coverage> | ||
<php> | ||
<env name="DB_CONNECTION" value="testing"/> | ||
</php> | ||
<logging> | ||
<log type="coverage-clover" target="build/logs/clover.xml"/> | ||
<log type="coverage-text" target="build/logs/coverage.txt"/> | ||
<log type="coverage-html" target="build/logs/coverage"/> | ||
</logging> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
/** | ||
* Class Ability | ||
* | ||
* @package Arcanedev\LaravelPolicies | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class Ability implements AbilityContract | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,10 +9,9 @@ | |
use JsonSerializable; | ||
|
||
/** | ||
* Interface Ability | ||
* Interface Ability | ||
* | ||
* @package Arcanedev\LaravelPolicies\Contracts | ||
* @author ARCANEDEV <[email protected]> | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
interface Ability extends Arrayable, JsonSerializable, Jsonable | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,9 @@ | |
namespace Arcanedev\LaravelPolicies\Contracts; | ||
|
||
/** | ||
* Class Policy | ||
* Interface Policy | ||
* | ||
* @package Arcanedev\LaravelPolicies\Contracts | ||
* @author ARCANEDEV <[email protected]> | ||
* | ||
* @method \Arcanedev\LaravelPolicies\Ability[]|iterable abilities() | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
interface Policy | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,10 +7,9 @@ | |
use Illuminate\Support\Collection; | ||
|
||
/** | ||
* Interface PolicyManager | ||
* Interface PolicyManager | ||
* | ||
* @package Arcanedev\LaravelPolicies\Contracts | ||
* @author ARCANEDEV <[email protected]> | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
interface PolicyManager | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
/** | ||
* Class PoliciesServiceProvider | ||
* | ||
* @package Arcanedev\LaravelPolicies | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class PoliciesServiceProvider extends PackageServiceProvider implements DeferrableProvider | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
/** | ||
* Class Policy | ||
* | ||
* @package Arcanedev\LaravelPolicies | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
abstract class Policy implements PolicyContract | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,6 @@ | |
/** | ||
* Class PolicyManager | ||
* | ||
* @package Arcanedev\LaravelPolicies | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class PolicyManager implements PolicyManagerContract | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
/** | ||
* Class AbilityTest | ||
* | ||
* @package Arcanedev\LaravelPolicies\Tests | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class AbilityTest extends TestCase | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ | |
/** | ||
* Class AuthorizationTest | ||
* | ||
* @package Arcanedev\LaravelPolicies\Tests | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class AuthorizationTest extends TestCase | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,8 @@ | |
use Illuminate\Foundation\Auth\User; | ||
|
||
/** | ||
* Class AbilityClass | ||
* Class DedicatedAbility | ||
* | ||
* @package Arcanedev\LaravelPolicies\Tests\Fixtures\Policies\Abilities | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class DedicatedAbility | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
/** | ||
* Class PostsPolicy | ||
* | ||
* @package Arcanedev\LaravelPolicies\Tests\Fixtures\Policies | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class PostsPolicy extends Policy | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,6 @@ | |
/** | ||
* Class PrefixedPolicy | ||
* | ||
* @package Arcanedev\LaravelPolicies\Tests\Fixtures\Policies | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class PrefixedPolicy extends Policy | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Arcanedev\LaravelPolicies\Tests; | ||
|
||
use Arcanedev\LaravelPolicies\PoliciesServiceProvider; | ||
|
||
/** | ||
* Class PoliciesServiceProviderTest | ||
* | ||
* @package Arcanedev\LaravelPolicies\Tests | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class PoliciesServiceProviderTest extends TestCase | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
/** | ||
* Class PolicyManagerTest | ||
* | ||
* @package Arcanedev\LaravelPolicies\Tests | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class PolicyManagerTest extends TestCase | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,6 @@ | |
/** | ||
* Class PolicyTest | ||
* | ||
* @package Arcanedev\LaravelPolicies\Tests | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
class PolicyTest extends TestCase | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ | |
/** | ||
* Class TestCase | ||
* | ||
* @package Arcanedev\LaravelPolicies\Tests | ||
* @author ARCANEDEV <[email protected]> | ||
*/ | ||
abstract class TestCase extends BaseTestCase | ||
|