@@ -66,9 +66,8 @@ public function tearDown(): void {
6666 public function test_checkevents (): void {
6767 // Test the subevents.
6868 $ this ->assertEquals (false , townsquaresupport_check_subplugin_events ($ this ->testdata ->subevents1 ));
69- $ this ->assertEquals (false , townsquaresupport_check_subplugin_events ($ this ->testdata ->subevents2 ));
70- $ this ->assertEquals (true , townsquaresupport_check_subplugin_events ($ this ->testdata ->subevents3 ));
71- $ this ->assertEquals (false , townsquaresupport_check_subplugin_events ($ this ->testdata ->subevents4 ));
69+ $ this ->assertEquals (true , townsquaresupport_check_subplugin_events ($ this ->testdata ->subevents2 ));
70+ $ this ->assertEquals (false , townsquaresupport_check_subplugin_events ($ this ->testdata ->subevents3 ));
7271 }
7372
7473 // Helper functions.
@@ -84,10 +83,6 @@ private function helper_test_set_up(): void {
8483 $ incorrecteevent1 = ['courseid ' => 12 , 'modulename ' => 'pluginname ' , 'instancename ' => 'instance1 ' ,
8584 'timestart ' => 123456789 , 'coursemoduleid ' => 13 , 'eventtype ' => 'eventtypeone ' , ];
8685
87- // Second incorrect event: variable 'courseid' is not a integer.
88- $ incorrecteevent2 = ['courseid ' => '6 ' , 'modulename ' => 'pluginname ' , 'instancename ' => 'instance1 ' , 'content ' => 'hello ' ,
89- 'timestart ' => 123456789 , 'coursemoduleid ' => 13 , 'eventtype ' => 'eventtypeone ' , ];
90-
9186 // Two completely correct events.
9287 $ correctevent1 = ['courseid ' => 12 , 'modulename ' => 'pluginname ' , 'instancename ' => 'instance1 ' , 'content ' => 'hello ' ,
9388 'timestart ' => 123456789 , 'coursemoduleid ' => 13 , 'eventtype ' => 'eventtypeone ' , ];
@@ -97,9 +92,8 @@ private function helper_test_set_up(): void {
9792
9893 // Build different combinations of the events.
9994 $ this ->testdata ->subevents1 = [(object )$ incorrecteevent1 , (object )$ correctevent1 ];
100- $ this ->testdata ->subevents2 = [(object )$ incorrecteevent2 , (object )$ correctevent2 ];
101- $ this ->testdata ->subevents3 = [(object )$ correctevent1 , (object )$ correctevent2 ];
102- $ this ->testdata ->subevents4 = ['arraykey ' => 'incorrectsubevent ' ];
95+ $ this ->testdata ->subevents2 = [(object )$ correctevent1 , (object )$ correctevent2 ];
96+ $ this ->testdata ->subevents3 = ['arraykey ' => 'incorrectsubevent ' ];
10397 }
10498
10599}
0 commit comments