This commit is contained in:
Mihail Geshoski
2025-07-22 23:54:03 +08:00
2 changed files with 8 additions and 4 deletions
@@ -68,12 +68,14 @@ final class custom_report_exporter_test extends advanced_testcase {
$this->assertEmpty($export->attributes);
// The following are all generated by additional exporters.
$this->assertEmpty($export->button);
$this->assertNotEmpty($export->sidebarmenucards);
$this->assertNotEmpty($export->conditions);
$this->assertNotEmpty($export->filters);
$this->assertNotEmpty($export->sorting);
$this->assertNotEmpty($export->cardview);
// The following should not be present when editing.
$this->assertObjectNotHasProperty('button', $export);
}
/**
@@ -112,7 +114,7 @@ final class custom_report_exporter_test extends advanced_testcase {
// The following are all generated by additional exporters.
$this->assertNotEmpty($export->button);
// The following should not be present when not editing.
// The following should not be present when viewing.
$this->assertObjectNotHasProperty('sidebarmenucards', $export);
$this->assertObjectNotHasProperty('conditions', $export);
$this->assertObjectNotHasProperty('filters', $export);
+4 -2
View File
@@ -70,7 +70,6 @@ final class get_test extends externallib_advanced_testcase {
$this->assertEquals($result['source'], users::class);
$this->assertNotEmpty($result['table']);
$this->assertNotEmpty($result['javascript']);
$this->assertEmpty($result['button']);
$this->assertEquals('Hello', $result['infocontainer']);
$this->assertFalse($result['filterspresent']);
$this->assertEmpty($result['filtersform']);
@@ -87,6 +86,9 @@ final class get_test extends externallib_advanced_testcase {
$this->assertEquals($filteremail->get('id'), $result['filters']['activefilters'][1]['id']);
$this->assertNotEmpty($result['sorting']);
$this->assertNotEmpty($result['cardview']);
// The following should not be present when editing.
$this->assertArrayNotHasKey('button', $result);
}
/**
@@ -135,7 +137,7 @@ final class get_test extends externallib_advanced_testcase {
$this->assertNotEmpty($result['filtersform']);
$this->assertFalse($result['editmode']);
// Confirm editor-specific data is not returned.
// The following should not be present when viewing.
$this->assertArrayNotHasKey('sidebarmenucards', $result);
$this->assertArrayNotHasKey('conditions', $result);
$this->assertArrayNotHasKey('filters', $result);