diff options
author | Stefan Giehl <stefan@matomo.org> | 2020-10-28 23:46:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-28 23:46:35 +0300 |
commit | 0e910f0badf1aaa6e1b34b83f4f1f9a11bd5b373 (patch) | |
tree | 64c6e341629ba8cd9f77c913fa777ee9f3537dfc /tests | |
parent | eb1543097d188c322b8470fea240fb62e39d01dd (diff) |
Improve possibility to disable visits log / visitor profile (#16598)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/PHPUnit/Framework/TestRequest/Response.php | 3 | ||||
-rw-r--r-- | tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getAvailableMeasurableTypes.xml | 24 |
2 files changed, 15 insertions, 12 deletions
diff --git a/tests/PHPUnit/Framework/TestRequest/Response.php b/tests/PHPUnit/Framework/TestRequest/Response.php index 50f1a76040..1a7a588bcc 100644 --- a/tests/PHPUnit/Framework/TestRequest/Response.php +++ b/tests/PHPUnit/Framework/TestRequest/Response.php @@ -60,6 +60,9 @@ class Response { $testRequest = new Request($requestUrl); + // set the request as root request + Request::setIsRootRequestApiRequest(Request::getMethodIfApiRequest(Request::getRequestArrayFromString($requestUrl, null))); + // Cast as string is important. For example when calling // with format=original, objects or php arrays can be returned. $response = (string) $testRequest->process(); diff --git a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getAvailableMeasurableTypes.xml b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getAvailableMeasurableTypes.xml index a5c7472880..064562f5cf 100644 --- a/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getAvailableMeasurableTypes.xml +++ b/tests/PHPUnit/System/expected/test_apiGetReportMetadata__API.getAvailableMeasurableTypes.xml @@ -226,36 +226,36 @@ https://www.example.org/</placeholder> <title>Live</title> <settings> <row> - <name>activate_visitor_log</name> - <title>Enable visits log</title> - <value>1</value> - <defaultValue>1</defaultValue> + <name>disable_visitor_log</name> + <title>Disable visits log & visitor profile</title> + <value>0</value> + <defaultValue>0</defaultValue> <type>boolean</type> <uiControl>checkbox</uiControl> <uiControlAttributes> </uiControlAttributes> <availableValues /> <description /> - <inlineHelp /> + <inlineHelp>Here you can disable the visits log and visitor profile feature. This will also disable features that depend on such like the ecommerce log, the segmented visits log, the realtime map or the realtime widget. This might be required to comply with your local privacy laws/guidelines.</inlineHelp> <templateFile /> <introduction /> <condition /> </row> <row> - <name>activate_visitor_profile</name> - <title>Enable visitor profile</title> - <value>1</value> - <defaultValue>1</defaultValue> + <name>disable_visitor_profile</name> + <title>Disable visitor profile only</title> + <value>0</value> + <defaultValue>0</defaultValue> <type>boolean</type> <uiControl>checkbox</uiControl> <uiControlAttributes> </uiControlAttributes> <availableValues /> <description /> - <inlineHelp /> + <inlineHelp>Here you can disable the visitor profile feature. All visits log related features will remain working.</inlineHelp> <templateFile /> <introduction /> - <condition /> + <condition>disable_visitor_log==0</condition> </row> </settings> </row> @@ -540,7 +540,7 @@ https://www.example.org/</placeholder> <inlineHelp /> <templateFile /> <introduction /> - <condition /> + <condition>activate_visitor_log==1</condition> </row> </settings> </row> |