Exemplo n.º 1
0
 function test_can_edit()
 {
     // If the module has edit_right then the user must have the specified right for editting
     // the DummyModule defaults edit_right to 'edit_record' for tests
     $module = new DummyModule();
     $user = new MockUser();
     $user->expectOnce('has_right', array('edit_record'));
     $user->setReturnValue('has_right', true);
     $this->assertTrue($module->can_edit($user));
 }