forked from moodle/moodle
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDL-82114 files: report entity filters for file component/area.
- Loading branch information
1 parent
5aef789
commit 956c64f
Showing
2 changed files
with
38 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ | |
* @copyright 2022 Paul Holden <[email protected]> | ||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later | ||
*/ | ||
class files_test extends core_reportbuilder_testcase { | ||
final class files_test extends core_reportbuilder_testcase { | ||
|
||
/** | ||
* Test default datasource | ||
|
@@ -205,7 +205,7 @@ public function test_datasource_non_default_columns(): void { | |
* | ||
* @return array[] | ||
*/ | ||
public function datasource_filters_provider(): array { | ||
public static function datasource_filters_provider(): array { | ||
return [ | ||
// File. | ||
'Filter directory' => ['file:directory', [ | ||
|
@@ -247,6 +247,22 @@ public function datasource_filters_provider(): array { | |
'file:contenthash_operator' => text::IS_EQUAL_TO, | ||
'file:contenthash_value' => 'f00f', | ||
], 0], | ||
'Filter component' => ['file:component', [ | ||
'file:component_operator' => text::IS_EQUAL_TO, | ||
'file:component_value' => 'course', | ||
], 2], | ||
'Filter component (no match)' => ['file:component', [ | ||
'file:component_operator' => text::IS_EQUAL_TO, | ||
'file:component_value' => 'reportbuilder', | ||
], 0], | ||
'Filter area' => ['file:area', [ | ||
'file:area_operator' => text::IS_EQUAL_TO, | ||
'file:area_value' => 'summary', | ||
], 2], | ||
'Filter area (no match)' => ['file:area', [ | ||
'file:area_operator' => text::IS_EQUAL_TO, | ||
'file:area_value' => 'report', | ||
], 0], | ||
'Filter time created' => ['file:timecreated', [ | ||
'file:timecreated_operator' => date::DATE_RANGE, | ||
'file:timecreated_from' => 1622502000, | ||
|