File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -93,6 +93,33 @@ public function test_query_db_cached(): void {
93
93
// After purging, we expect 13.
94
94
$ this ->assertEquals (13 , $ nrofrows );
95
95
96
+ // Search for courses by name.
97
+ $ nrofrows = $ this ->get_rowscount_for_table (
98
+ $ table ,
99
+ 0 ,
100
+ null ,
101
+ null ,
102
+ null ,
103
+ null ,
104
+ null ,
105
+ null ,
106
+ 'filtercourse '
107
+ );
108
+ $ this ->assertEquals (3 , $ nrofrows );
109
+
110
+ $ nrofrows = $ this ->get_rowscount_for_table (
111
+ $ table ,
112
+ 0 ,
113
+ null ,
114
+ null ,
115
+ null ,
116
+ null ,
117
+ null ,
118
+ null ,
119
+ 'Test course 9 '
120
+ );
121
+ $ this ->assertEquals (1 , $ nrofrows );
122
+
96
123
// Now we want to test pagination.
97
124
$ this ->create_test_courses (30 );
98
125
@@ -145,6 +172,9 @@ public function create_demo2_table() {
145
172
$ table ->define_headers (array_values ($ columns ));
146
173
$ table ->define_columns (array_keys ($ columns ));
147
174
175
+ $ table ->define_fulltextsearchcolumns (['fullname ' , 'shortname ' ]);
176
+ $ table ->define_sortablecolumns ($ columns );
177
+
148
178
$ standardfilter = new standardfilter ('fullname ' , 'fullname ' );
149
179
$ table ->add_filter ($ standardfilter );
150
180
You can’t perform that action at this time.
0 commit comments