1<?php 2// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project 3// 4// All Rights Reserved. See copyright.txt for details and a complete list of authors. 5// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. 6// $Id$ 7 8/** 9 * @group unit 10 * 11 */ 12 13class Perms_Resolver_DefaultTest extends TikiTestCase 14{ 15 function testAsExpected() 16 { 17 $resolver = new Perms_Resolver_Default(true); 18 $this->assertTrue($resolver->check('view', [])); 19 20 $resolver = new Perms_Resolver_Default(false); 21 $this->assertFalse($resolver->check('view', [])); 22 } 23 24 function testApplicableGroups() 25 { 26 $resolver = new Perms_Resolver_Default(true); 27 $this->assertContains('Anonymous', $resolver->applicableGroups()); 28 $this->assertContains('Registered', $resolver->applicableGroups()); 29 } 30} 31