Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
CiviCRM Core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Development
CiviCRM Core
Commits
56077728
Unverified
Commit
56077728
authored
3 years ago
by
Eileen McNaughton
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #21437 from demeritcowboy/dashboard-fail
#2829
- unit test for nonempty dashboard
parents
741ebf1f
9c833171
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/phpunit/CRM/Core/InvokeTest.php
+21
-0
21 additions, 0 deletions
tests/phpunit/CRM/Core/InvokeTest.php
with
21 additions
and
0 deletions
tests/phpunit/CRM/Core/InvokeTest.php
+
21
−
0
View file @
56077728
...
...
@@ -30,4 +30,25 @@ class CRM_Core_InvokeTest extends CiviUnitTestCase {
ob_end_clean
();
}
/**
* Test dashboard with something actually on it.
*/
public
function
testInvokeDashboardWithGettingStartedDashlet
():
void
{
$user_id
=
$this
->
createLoggedInUser
();
$this
->
callAPISuccess
(
'DashboardContact'
,
'create'
,
[
'dashboard_id'
=>
2
,
'contact_id'
=>
$user_id
,
]);
CRM_Core_Config
::
singleton
()
->
userPermissionClass
->
permissions
=
[
'access CiviCRM'
];
$_SERVER
[
'REQUEST_URI'
]
=
'civicrm/dashboard?reset=1'
;
$_GET
[
'q'
]
=
'civicrm/dashboard'
;
$item
=
CRM_Core_Invoke
::
getItem
([
'civicrm/dashboard?reset=1'
]);
ob_start
();
CRM_Core_Invoke
::
runItem
(
$item
);
ob_end_clean
();
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment