Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
WP Plugins
Cron-Control
Commits
9626da5a
Verified
Commit
9626da5a
authored
Nov 15, 2016
by
Erick Hitter
Browse files
Basic tests that internal events are scheduled properly
parent
cac0dec6
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/test-internal-events.php
View file @
9626da5a
...
...
@@ -14,6 +14,16 @@ class WPCCR_Internal_Events_Test extends WP_UnitTestCase {
* Internal events should be scheduled
*/
function
test_events
()
{
$this
->
assertTrue
(
true
);
WP_Cron_Control_Revisited\Internal_Events
::
instance
()
->
schedule_internal_events
();
$events
=
\
WP_Cron_Control_Revisited\collapse_events_array
(
get_option
(
'cron'
)
);
// Check that the plugin scheduled the expected number of events
$this
->
assertEquals
(
count
(
$events
),
3
);
// Confirm that the scheduled jobs came from the Internal Events class
foreach
(
$events
as
$event
)
{
$this
->
assertTrue
(
\
WP_Cron_Control_Revisited\is_internal_event
(
$event
[
'action'
]
)
);
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment