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 {
9393 // After purging, we expect 13.
9494 $ this ->assertEquals (13 , $ nrofrows );
9595
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+
96123 // Now we want to test pagination.
97124 $ this ->create_test_courses (30 );
98125
@@ -145,6 +172,9 @@ public function create_demo2_table() {
145172 $ table ->define_headers (array_values ($ columns ));
146173 $ table ->define_columns (array_keys ($ columns ));
147174
175+ $ table ->define_fulltextsearchcolumns (['fullname ' , 'shortname ' ]);
176+ $ table ->define_sortablecolumns ($ columns );
177+
148178 $ standardfilter = new standardfilter ('fullname ' , 'fullname ' );
149179 $ table ->add_filter ($ standardfilter );
150180
You can’t perform that action at this time.
0 commit comments