Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-42517 testing Changed events test to use assertDebuggingCalled()

  • Loading branch information...
commit 85e7a92e5448b1e72698c25f6347e133831e0f77 1 parent 34fb354
@micaherne micaherne authored
Showing with 1 addition and 4 deletions.
  1. +1 −4 lib/tests/eventslib_test.php
View
5 lib/tests/eventslib_test.php
@@ -132,11 +132,8 @@ public function test_events_trigger__failed_instant() {
$this->assertEquals(1, events_trigger('test_instant', 'fail'), 'fail first event: %s');
$this->assertEquals(1, events_trigger('test_instant', 'ok'), 'this one should fail too: %s');
- // We disable debugging for this next test. It'll make some noise when it fails to dispatch
- // so that problems don't go permanently unnoticed.
- $CFG->debug = 0;
$this->assertEquals(0, events_cron('test_instant'), 'all events should stay in queue: %s');
- $CFG->debug = $olddebug;
+ $this->assertDebuggingCalled();
$this->assertEquals(2, events_pending_count('test_instant'), 'two events should in queue: %s');
$this->assertEquals(0, eventslib_sample_function_handler('status'), 'verify no event dispatched yet: %s');
Please sign in to comment.
Something went wrong with that request. Please try again.