Commit 188f4478 authored by Nicolas Widart's avatar Nicolas Widart

Merge commit 'ef29dea3'

* commit 'ef29dea3':
  Squashed 'Modules/Core/' changes from 5720517..6c75acf
parents 347f044f ef29dea3
language: php
php:
- 5.6
- 5.5
- 5.4
- hhvm
install:
- travis_retry composer install --no-interaction --prefer-source
script:
- phpunit --verbose
<?php namespace Modules\Core\Http\Controllers\Admin;
/**
* @Before("auth.admin")
*/
class AdminBaseController
{
public function __construct()
......
<?php namespace Modules\Core\Tests\Permissions;
use Modules\Core\Tests\BaseTestCase;
use Mockery;
use Modules\Core\Permissions\PermissionManager;
class PermissionManagerTest extends \TestCase
class PermissionManagerTest extends BaseTestCase
{
/**
* @var PermissionManager
......@@ -27,39 +28,6 @@ class PermissionManagerTest extends \TestCase
$this->permissions = new PermissionManager($moduleMock);
}
/** @test */
public function itShouldReturnAllPermissions()
{
$expected = [
'Dashboard' => [
'dashboard' => ['index']
],
'User' => [
'users' => [
'index',
'create',
'store',
'edit',
'update',
'destroy'
],
'roles' => [
'index',
'create',
'store',
'edit',
'update',
'destroy'
]
],
];
$permissions = $this->permissions->all();
$this->assertEquals($expected, $permissions);
}
/** @test */
public function itShouldCleanPermissionsCorrectlyTypeCasted()
{
$requestData = [
......
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Composer Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
|
*/
require __DIR__.'/../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Include The Compiled Class File
|--------------------------------------------------------------------------
|
| To dramatically increase your application's performance, you may use a
| compiled class file which contains all of the classes commonly used
| by a request. The Artisan "optimize" is used to create this file.
|
*/
$compiledPath = __DIR__.'/../storage/meta/compiled.php';
if (file_exists($compiledPath))
{
require $compiledPath;
}
{
"name": "asgardcms/core-module",
"type": "asgard-module",
"description": "The core module for AsgardCMS. This is required for every install.",
"keywords": [
"asgardcms",
"core"
],
"license": "MIT",
"authors": [
{
"name": "Nicolas Widart",
"email": "info@asgardcms.com",
"role": "Developer"
}
],
"support": {
"email": "support@asgardcms.com",
"issues": "https://github.com/AsgardCms/Core/issues",
"source": "https://github.com/AsgardCms/Core"
},
"require": {
"php": ">=5.4",
"composer/installers": "~1.0",
"laravel/framework": "dev-master#ba916851321b9233cb56a0fb1deb41043b7df5fb"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"minimum-stability": "dev"
}
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="bootstrap/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
syntaxCheck="false"
>
<testsuites>
<testsuite name="Modules Test Suite">
<directory>./Tests/</directory>
</testsuite>
</testsuites>
</phpunit>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment