3 +--------------------------------------------------------------------+
4 | Copyright CiviCRM LLC. All rights reserved. |
6 | This work is published under the GNU AGPLv3 license with some |
7 | permitted exceptions and without any warranty. For full license |
8 | and copyright information, see https://civicrm.org/licensing |
9 +--------------------------------------------------------------------+
15 class CRM_Core_InvokeTest
extends CiviUnitTestCase
{
18 * Test that no php errors come up invoking dashboard url for non-admins
19 * Motivation: This currently fails on php 7.4 because of IDS and magicquotes.
21 public function testInvokeDashboardForNonAdmin(): void
{
22 CRM_Core_Config
::singleton()->userPermissionClass
->permissions
= ['access CiviCRM'];
24 $_SERVER['REQUEST_URI'] = 'civicrm/dashboard?reset=1';
25 $_GET['q'] = 'civicrm/dashboard';
27 $item = CRM_Core_Invoke
::getItem(['civicrm/dashboard?reset=1']);
29 CRM_Core_Invoke
::runItem($item);