Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/PHPUnit/Fixtures/DisableSiteContentDetection.php')
-rw-r--r--tests/PHPUnit/Fixtures/DisableSiteContentDetection.php49
1 files changed, 49 insertions, 0 deletions
diff --git a/tests/PHPUnit/Fixtures/DisableSiteContentDetection.php b/tests/PHPUnit/Fixtures/DisableSiteContentDetection.php
new file mode 100644
index 0000000000..3ac9ac74e2
--- /dev/null
+++ b/tests/PHPUnit/Fixtures/DisableSiteContentDetection.php
@@ -0,0 +1,49 @@
+<?php
+/**
+ * Matomo - free/libre analytics platform
+ *
+ * @link https://matomo.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+namespace Piwik\Tests\Fixtures;
+
+use Piwik\Tests\Framework\Fixture;
+use Piwik\SiteContentDetector;
+use Piwik\Tests\Framework\Mock\FakeSiteContentDetector;
+
+/**
+ * Fixture that disables site content detection by returning null values and preventing a live request
+ *
+ */
+class DisableSiteContentDetection extends Fixture
+{
+
+ public function provideContainerConfig()
+ {
+ $mockData = [
+ 'consentManagerId' => null,
+ 'consentManagerName' => null,
+ 'consentManagerUrl' => null,
+ 'isConnected' => false,
+ 'ga3' => false,
+ 'ga4' => false,
+ 'gtm' => false
+ ];
+
+ return [
+ SiteContentDetector::class => \DI\autowire(FakeSiteContentDetector::class)
+ ->constructorParameter('mockData', $mockData)
+ ];
+ }
+
+ public function setUp(): void
+ {
+ // empty
+ }
+
+ public function tearDown(): void
+ {
+ // empty
+ }
+
+}