Phalcon\Test\Unit\Acl\Adapter\MemoryTest::testAclAddRoleTwiceByKeyReturnsFalse PHP Method

testAclAddRoleTwiceByKeyReturnsFalse() public method

Tests the addRole for the same role twice by key
Since: 2014-10-04
Author: Nikolaos Dimopoulos ([email protected])
    public function testAclAddRoleTwiceByKeyReturnsFalse()
    {
        $this->specify('Acl\\Role added twice by key returns true', function () {
            $acl = new Memory();
            $aclRole = new Role('Administrators', 'Super User access');
            $acl->addRole($aclRole);
            $actual = $acl->addRole('Administrators');
            expect($actual)->false();
        });
    }