Skip to content

Commit

Permalink
Regression test for phalcon#65
Browse files Browse the repository at this point in the history
(cherry picked from commit 14b82c5ad05d6c65bd9306e5c5ff5b9c0286ed4f)
  • Loading branch information
sjinks committed Sep 27, 2013
1 parent 37e6ae0 commit 224452b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions ext/tests/issue-65.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
--TEST--
Negating ACL roles - https://github.com/phalcon/cphalcon/issues/65
--SKIPIF--
<?php include('skipif.inc'); ?>
--FILE--
<?php
$acl = new \Phalcon\Acl\Adapter\Memory();
$acl->setDefaultAction(\Phalcon\Acl::DENY);

$acl->addRole('Guests');
$acl->addRole('Members', 'Guests');

$acl->addResource('Login', array('index'));

$acl->allow('Guests', 'Login', 'index');
$acl->deny('Members', 'Login', 'index');
var_dump((bool)$acl->isAllowed('Members', 'Login', 'index'));
?>
--EXPECT--
bool(false)

0 comments on commit 224452b

Please sign in to comment.