mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
Merge pull request #275 from SashaAnastasi/auth_outage_totara15_runtest_fixes_39_STABLE
Issue#271: Fix refactored phpunit_util causing unit test error
This commit is contained in:
@@ -134,8 +134,8 @@ class auth_outage_calendar_test extends advanced_testcase {
|
||||
]);
|
||||
|
||||
calendar::update($outage);
|
||||
self::assertCount(1, phpunit_util::get_debugging_messages());
|
||||
phpunit_util::reset_debugging();
|
||||
self::assertCount(1, $this->getDebuggingMessages());
|
||||
$this->resetDebugging();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,8 +146,8 @@ class auth_outage_calendar_test extends advanced_testcase {
|
||||
self::setAdminUser();
|
||||
|
||||
calendar::delete(1);
|
||||
self::assertCount(1, phpunit_util::get_debugging_messages());
|
||||
phpunit_util::reset_debugging();
|
||||
self::assertCount(1, $this->getDebuggingMessages());
|
||||
$this->resetDebugging();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -427,8 +427,8 @@ class auth_outage_outagedb_test extends auth_outage_base_testcase {
|
||||
public function test_finish_now_notfound() {
|
||||
$this->resetAfterTest(true);
|
||||
outagedb::finish(1);
|
||||
self::assertCount(1, phpunit_util::get_debugging_messages());
|
||||
phpunit_util::reset_debugging();
|
||||
self::assertCount(1, $this->getDebuggingMessages());
|
||||
$this->resetDebugging();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -449,8 +449,8 @@ class auth_outage_outagedb_test extends auth_outage_base_testcase {
|
||||
self::assertTrue(!$outage->is_ongoing($time));
|
||||
|
||||
outagedb::finish($id, $time);
|
||||
self::assertCount(1, phpunit_util::get_debugging_messages());
|
||||
phpunit_util::reset_debugging();
|
||||
self::assertCount(1, $this->getDebuggingMessages());
|
||||
$this->resetDebugging();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -146,8 +146,8 @@ class auth_outage_forms_test extends auth_outage_base_testcase {
|
||||
$_POST['description'] = ['text' => 'The <b>description</b>.', 'format' => '2'];
|
||||
$edit = new edit();
|
||||
self::assertNull($edit->get_data());
|
||||
self::assertCount(1, phpunit_util::get_debugging_messages());
|
||||
phpunit_util::reset_debugging();
|
||||
self::assertCount(1, $this->getDebuggingMessages());
|
||||
$this->resetDebugging();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -401,8 +401,8 @@ class auth_outage_maintenance_static_page_test extends auth_outage_base_testcase
|
||||
$found = maintenance_static_page_io::file_get_data(__DIR__.'/fixtures/invalidfile');
|
||||
self::assertSame('', $found['contents']);
|
||||
self::assertSame('unknown', $found['mime']);
|
||||
self::assertCount(1, phpunit_util::get_debugging_messages());
|
||||
phpunit_util::reset_debugging();
|
||||
self::assertCount(1, $this->getDebuggingMessages());
|
||||
$this->resetDebugging();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -62,8 +62,8 @@ class auth_outage_outagelib_test extends auth_outage_base_testcase {
|
||||
set_config('maintenance_message', 'A message.');
|
||||
outagedb::save($outage);
|
||||
self::assertFalse((bool)get_config('moodle', 'maintenance_message'));
|
||||
self::assertCount(2, phpunit_util::get_debugging_messages());
|
||||
phpunit_util::reset_debugging();
|
||||
self::assertCount(2, $this->getDebuggingMessages());
|
||||
$this->resetDebugging();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -116,8 +116,8 @@ class auth_outage_outagelib_test extends auth_outage_base_testcase {
|
||||
$_GET = ['auth_outage_break_code' => '1'];
|
||||
outagelib::reset_injectcalled();
|
||||
$header = outagelib::get_inject_code();
|
||||
self::assertCount(2, phpunit_util::get_debugging_messages());
|
||||
phpunit_util::reset_debugging();
|
||||
self::assertCount(2, $this->getDebuggingMessages());
|
||||
$this->resetDebugging();
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user