Skip to content

Commit

Permalink
Revert "Added VirtualResource"
Browse files Browse the repository at this point in the history
This reverts commit 808d06d.
  • Loading branch information
mnapoli committed Jul 1, 2014
1 parent f19ae05 commit 1180bee
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 151 deletions.
2 changes: 1 addition & 1 deletion src/Model/ClassResource.php
Expand Up @@ -9,7 +9,7 @@
*
* @author Matthieu Napoli <matthieu@mnapoli.fr>
*/
class ClassResource implements ResourceInterface, CascadingResource
final class ClassResource implements ResourceInterface, CascadingResource
{
/**
* @var string
Expand Down
52 changes: 0 additions & 52 deletions src/Model/VirtualResource.php

This file was deleted.

7 changes: 1 addition & 6 deletions tests/Integration/AbstractIntegrationTest.php
Expand Up @@ -12,7 +12,6 @@
use MyCLabs\ACL\ACL;
use MyCLabs\ACL\Doctrine\ACLSetup;
use MyCLabs\ACL\Model\ClassResource;
use MyCLabs\ACL\Model\VirtualResource;
use Tests\MyCLabs\ACL\Integration\Model\Actions;

abstract class AbstractIntegrationTest extends \PHPUnit_Framework_TestCase
Expand Down Expand Up @@ -94,11 +93,7 @@ private function configureACL()
'AccountAdmin' => [
'resourceType' => Issues\Issue10\Account::class,
'actions' => Actions::all()
],
'BackendAdmin' => [
'resource' => new VirtualResource('backend'),
'actions' => new Actions([Actions::VIEW]),
],
]
];

$setup->registerRoles($roles, $this->acl);
Expand Down
Expand Up @@ -8,11 +8,11 @@
use Tests\MyCLabs\ACL\Integration\Model\User;

/**
* Tests authorizations applied on class resources (i.e. all entities of type X).
* Tests authorizations applied at class scope (i.e. all entities of type X).
*
* @coversNothing
*/
class ClassResourceTest extends AbstractIntegrationTest
class ClassScopeTest extends AbstractIntegrationTest
{
/**
* Check when adding the role and all entities are already created and flushed
Expand Down
46 changes: 0 additions & 46 deletions tests/Integration/VirtualResourceTest.php

This file was deleted.

8 changes: 0 additions & 8 deletions tests/Unit/Model/ClassResourceTest.php
Expand Up @@ -18,14 +18,6 @@ public function testGetClass()
$this->assertEquals('foo', $resource->getClass());
}

public function testGetResourceId()
{
$resource = new ClassResource('foo');

$this->assertEquals('foo', $resource->getResourceId()->getName());
$this->assertNull($resource->getResourceId()->getId());
}

public function testParentResources()
{
$em = $this->getMock(EntityManager::class, [], [], '', false);
Expand Down
36 changes: 0 additions & 36 deletions tests/Unit/Model/VirtualResourceTest.php

This file was deleted.

0 comments on commit 1180bee

Please sign in to comment.