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/Framework/Mock/PiwikOption.php')
-rw-r--r--tests/PHPUnit/Framework/Mock/PiwikOption.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/PHPUnit/Framework/Mock/PiwikOption.php b/tests/PHPUnit/Framework/Mock/PiwikOption.php
new file mode 100644
index 0000000000..302232b94b
--- /dev/null
+++ b/tests/PHPUnit/Framework/Mock/PiwikOption.php
@@ -0,0 +1,30 @@
+<?php
+/**
+ * Piwik - free/libre analytics platform
+ *
+ * @link http://piwik.org
+ * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
+ */
+namespace Piwik\Tests\Framework\Mock;
+
+use Piwik\Option;
+
+class PiwikOption extends Option
+{
+ private $forcedOptionValue = false;
+
+ function __construct($forcedOptionValue)
+ {
+ $this->forcedOptionValue = $forcedOptionValue;
+ }
+
+ protected function getValue($name)
+ {
+ return $this->forcedOptionValue;
+ }
+
+ protected function setValue($name, $value, $autoLoad = 0)
+ {
+ $this->forcedOptionValue = $value;
+ }
+}