mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Merge branch 'MDL-77827-master' of https://github.com/HuongNV13/moodle
This commit is contained in:
commit
688c9b13d4
2 changed files with 10 additions and 6 deletions
|
@ -769,16 +769,19 @@ class base_test extends \advanced_testcase {
|
|||
$event4->trigger();
|
||||
$this->assertDebuggingNotCalled();
|
||||
|
||||
$event5 = \core_tests\event\problematic_event1::create(array('context'=>\context_system::instance(), 'other'=>(object)array('a'=>1)));
|
||||
// Check the invalid content that cannot be converted to JSON will trigger debugging messages.
|
||||
$event5 = \core_tests\event\problematic_event1::create(array('context' => \context_system::instance(), 'other' => [
|
||||
'a' => NAN
|
||||
]));
|
||||
$this->assertDebuggingNotCalled();
|
||||
$event5->trigger();
|
||||
$this->assertDebuggingCalled();
|
||||
|
||||
// Check that moodle_url object does not trigger debugging messages.
|
||||
$url = new \moodle_url('/admin/');
|
||||
$event6 = \core_tests\event\problematic_event1::create(array('context'=>\context_system::instance(), 'other'=>array('a'=>$url)));
|
||||
$this->assertDebuggingNotCalled();
|
||||
$event6->trigger();
|
||||
$this->assertDebuggingCalled();
|
||||
$this->assertDebuggingNotCalled();
|
||||
|
||||
// Check that whole float numbers do not trigger debugging messages.
|
||||
$event7 = \core_tests\event\unittest_executed::create(array('context'=>\context_system::instance(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue