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:
authorThomas Steur <thomas.steur@gmail.com>2016-01-28 23:59:59 +0300
committerThomas Steur <thomas.steur@gmail.com>2016-01-28 23:59:59 +0300
commit03b077db293640ca325aa04a617a26c22d757ba8 (patch)
treec390e1051f644a91846b2764a62e106739245ccc /tests/PHPUnit/Framework/Mock
parentf8d3e6fad11413cbeef5eb71080773dadf944012 (diff)
fixes #9648 New sentence presenting Piwik PRO after a successful Piwik installation
Diffstat (limited to 'tests/PHPUnit/Framework/Mock')
-rw-r--r--tests/PHPUnit/Framework/Mock/FakeConfig.php28
-rw-r--r--tests/PHPUnit/Framework/Mock/Plugin/Manager.php23
2 files changed, 51 insertions, 0 deletions
diff --git a/tests/PHPUnit/Framework/Mock/FakeConfig.php b/tests/PHPUnit/Framework/Mock/FakeConfig.php
new file mode 100644
index 0000000000..cab4955a13
--- /dev/null
+++ b/tests/PHPUnit/Framework/Mock/FakeConfig.php
@@ -0,0 +1,28 @@
+<?php
+
+namespace Piwik\Tests\Framework\Mock;
+
+use Piwik\Config;
+
+class FakeConfig extends Config
+{
+ private $configValues = array();
+
+ public function __construct($configValues = array())
+ {
+ $this->configValues = $configValues;
+ }
+
+ public function &__get($name)
+ {
+ if (isset($this->configValues[$name])) {
+ return $this->configValues[$name];
+ }
+ }
+
+ public function __set($name, $value)
+ {
+ $this->configValues[$name] = $value;
+ }
+
+}
diff --git a/tests/PHPUnit/Framework/Mock/Plugin/Manager.php b/tests/PHPUnit/Framework/Mock/Plugin/Manager.php
new file mode 100644
index 0000000000..3f79065ad6
--- /dev/null
+++ b/tests/PHPUnit/Framework/Mock/Plugin/Manager.php
@@ -0,0 +1,23 @@
+<?php
+
+namespace Piwik\Tests\Framework\Mock\Plugin;
+
+class Manager extends \Piwik\Plugin\Manager
+{
+ private $installedPlugins = array();
+
+ public function __construct()
+ {
+ }
+
+ public function setInstalledPlugins($pluginsList)
+ {
+ $this->installedPlugins = $pluginsList;
+ }
+
+ public function isPluginInstalled($pluginName)
+ {
+ return in_array($pluginName, $this->installedPlugins);
+ }
+
+}