Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
Platform
Commits
188f4478
Commit
188f4478
authored
Dec 07, 2014
by
Nicolas Widart
Browse files
Options
Browse Files
Download
Plain Diff
Merge commit '
ef29dea3
'
* commit '
ef29dea3
': Squashed 'Modules/Core/' changes from 5720517..6c75acf
parents
347f044f
ef29dea3
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
93 additions
and
37 deletions
+93
-37
.travis.yml
Modules/Core/.travis.yml
+7
-0
AdminBaseController.php
Modules/Core/Http/Controllers/Admin/AdminBaseController.php
+0
-3
PermissionManagerTest.php
Modules/Core/Tests/Permissions/PermissionManagerTest.php
+2
-34
autoload.php
Modules/Core/bootstrap/autoload.php
+35
-0
composer.json
Modules/Core/composer.json
+31
-0
phpunit.xml
Modules/Core/phpunit.xml
+18
-0
No files found.
Modules/Core/.travis.yml
View file @
188f4478
language
:
php
php
:
-
5.6
-
5.5
-
5.4
-
hhvm
install
:
-
travis_retry composer install --no-interaction --prefer-source
script
:
-
phpunit --verbose
Modules/Core/Http/Controllers/Admin/AdminBaseController.php
View file @
188f4478
<?php
namespace
Modules\Core\Http\Controllers\Admin
;
/**
* @Before("auth.admin")
*/
class
AdminBaseController
{
public
function
__construct
()
...
...
Modules/Core/Tests/Permissions/PermissionManagerTest.php
View file @
188f4478
<?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
Base
TestCase
{
/**
* @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
=
[
...
...
Modules/Core/bootstrap/autoload.php
0 → 100644
View file @
188f4478
<?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
;
}
Modules/Core/composer.json
0 → 100644
View file @
188f4478
{
"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"
}
Modules/Core/phpunit.xml
0 → 100644
View file @
188f4478
<?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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment