private function SchedulerRulesTest::checkEventText in Scheduler 7
Helper function to check which events have been triggered.
Parameters
array $expected: Array of integers to indicate which messages (1-6) should be seen.
1 call to SchedulerRulesTest::checkEventText()
- SchedulerRulesTest::testRulesEvents in tests/
scheduler.test - Tests the six events provided by Scheduler.
File
- tests/
scheduler.test, line 1557 - Scheduler module test case file.
Class
- SchedulerRulesTest
- Tests Schedulers interaction with the Rules module.
Code
private function checkEventText(array $expected = array()) {
for ($i = 1; $i <= 6; $i++) {
$message = $this->eventMessage[$i];
if (in_array($i, $expected)) {
$this
->assertText($message, 'Event message "' . $message . '" is shown');
}
else {
$this
->assertNoText($message, 'Event message "' . $message . '" is not shown');
}
}
}