@@ -203,6 +203,7 @@ public function test_sortable(): void {
203
203
/**
204
204
* Test wb base full text search.
205
205
*
206
+ * @param string $tablecallback
206
207
* @param array $coursedata
207
208
* @param array $expected
208
209
*
@@ -216,7 +217,7 @@ public function test_sortable(): void {
216
217
*
217
218
* @dataProvider wb_table_common_settings_provider
218
219
*/
219
- public function test_dataprovider (array $ coursedata , array $ expected ): void {
220
+ public function test_dataprovider (string $ tablecallback , array $ coursedata , array $ expected ): void {
220
221
// Create the courses, depending on data provider.
221
222
$ courses = [];
222
223
foreach ($ coursedata as $ coursearray ) {
@@ -225,7 +226,7 @@ public function test_dataprovider(array $coursedata, array $expected): void {
225
226
226
227
$ this ->setAdminUser ();
227
228
228
- $ table = $ this ->create_demo2_table ();
229
+ $ table = $ this ->{ $ tablecallback } ();
229
230
230
231
// Set pagesize.
231
232
$ table ->pagesize = $ expected ['pagesize ' ] ?? 20 ;
@@ -594,6 +595,7 @@ public static function wb_table_common_settings_provider(): array {
594
595
$ returnarray = [
595
596
// Test name (description).
596
597
'filter_hierarchicalfilter ' => [
598
+ 'tablecallback ' => 'create_demo2_table ' ,
597
599
'courses ' => $ standardcourses ,
598
600
'expected ' => [
599
601
'getrowscount ' => [
@@ -620,6 +622,7 @@ public static function wb_table_common_settings_provider(): array {
620
622
],
621
623
],
622
624
'filter_callback ' => [
625
+ 'tablecallback ' => 'create_demo2_table ' ,
623
626
'courses ' => $ standardcourses ,
624
627
'expected ' => [
625
628
'getrowscount ' => [
@@ -638,6 +641,7 @@ public static function wb_table_common_settings_provider(): array {
638
641
],
639
642
],
640
643
'filter_datepicker_in_between ' => [
644
+ 'tablecallback ' => 'create_demo2_table ' ,
641
645
'courses ' => $ standardcourses ,
642
646
'expected ' => [
643
647
'getrowscount ' => [
@@ -700,6 +704,7 @@ public static function wb_table_common_settings_provider(): array {
700
704
],
701
705
],
702
706
'fulltextsearchcolumns ' => [
707
+ 'tablecallback ' => 'create_demo2_table ' ,
703
708
'courses ' => $ standardcourses ,
704
709
'expected ' => [
705
710
'getrowscount ' => [
@@ -722,6 +727,7 @@ public static function wb_table_common_settings_provider(): array {
722
727
],
723
728
],
724
729
'filter_standardfilter ' => [
730
+ 'tablecallback ' => 'create_demo2_table ' ,
725
731
'courses ' => $ standardcourses ,
726
732
'expected ' => [
727
733
'getrowscount ' => [
@@ -748,6 +754,7 @@ public static function wb_table_common_settings_provider(): array {
748
754
],
749
755
],
750
756
'filter_datepicker ' => [
757
+ 'tablecallback ' => 'create_demo2_table ' ,
751
758
'courses ' => $ standardcourses ,
752
759
'expected ' => [
753
760
'getrowscount ' => [
0 commit comments