diff --git a/tests/base_test.php b/tests/base_test.php index 1f122f6..cdef616 100644 --- a/tests/base_test.php +++ b/tests/base_test.php @@ -93,6 +93,33 @@ public function test_query_db_cached(): void { // After purging, we expect 13. $this->assertEquals(13, $nrofrows); + // Search for courses by name. + $nrofrows = $this->get_rowscount_for_table( + $table, + 0, + null, + null, + null, + null, + null, + null, + 'filtercourse' + ); + $this->assertEquals(3, $nrofrows); + + $nrofrows = $this->get_rowscount_for_table( + $table, + 0, + null, + null, + null, + null, + null, + null, + 'Test course 9' + ); + $this->assertEquals(1, $nrofrows); + // Now we want to test pagination. $this->create_test_courses(30); @@ -145,6 +172,9 @@ public function create_demo2_table() { $table->define_headers(array_values($columns)); $table->define_columns(array_keys($columns)); + $table->define_fulltextsearchcolumns(['fullname', 'shortname']); + $table->define_sortablecolumns($columns); + $standardfilter = new standardfilter('fullname', 'fullname'); $table->add_filter($standardfilter);