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

MockPiwikOption.php « PHPUnit « tests - github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8c87af973e1e0ea9b57e686757cf6bf7bef0e42a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
/**
 * Piwik - Open source web analytics
 *
 * @link http://piwik.org
 * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */
use Piwik\Option;

class MockPiwikOption 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;
    }
}