@@ -66,9 +66,8 @@ public function tearDown(): void {
66
66
public function test_checkevents (): void {
67
67
// Test the subevents.
68
68
$ 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 ));
72
71
}
73
72
74
73
// Helper functions.
@@ -84,10 +83,6 @@ private function helper_test_set_up(): void {
84
83
$ incorrecteevent1 = ['courseid ' => 12 , 'modulename ' => 'pluginname ' , 'instancename ' => 'instance1 ' ,
85
84
'timestart ' => 123456789 , 'coursemoduleid ' => 13 , 'eventtype ' => 'eventtypeone ' , ];
86
85
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
-
91
86
// Two completely correct events.
92
87
$ correctevent1 = ['courseid ' => 12 , 'modulename ' => 'pluginname ' , 'instancename ' => 'instance1 ' , 'content ' => 'hello ' ,
93
88
'timestart ' => 123456789 , 'coursemoduleid ' => 13 , 'eventtype ' => 'eventtypeone ' , ];
@@ -97,9 +92,8 @@ private function helper_test_set_up(): void {
97
92
98
93
// Build different combinations of the events.
99
94
$ 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 ' ];
103
97
}
104
98
105
99
}
0 commit comments