diff options
Diffstat (limited to 'tests/utils')
-rw-r--r-- | tests/utils/FakeApplicationUtils.php | 2 | ||||
-rw-r--r-- | tests/utils/FakeConfigManager.php | 10 | ||||
-rw-r--r-- | tests/utils/ReferenceHistory.php | 2 | ||||
-rw-r--r-- | tests/utils/ReferenceLinkDB.php | 2 |
4 files changed, 11 insertions, 5 deletions
diff --git a/tests/utils/FakeApplicationUtils.php b/tests/utils/FakeApplicationUtils.php index de83d598..d5289ede 100644 --- a/tests/utils/FakeApplicationUtils.php +++ b/tests/utils/FakeApplicationUtils.php | |||
@@ -2,6 +2,8 @@ | |||
2 | 2 | ||
3 | namespace Shaarli; | 3 | namespace Shaarli; |
4 | 4 | ||
5 | use Shaarli\Helper\ApplicationUtils; | ||
6 | |||
5 | /** | 7 | /** |
6 | * Fake ApplicationUtils class to avoid HTTP requests | 8 | * Fake ApplicationUtils class to avoid HTTP requests |
7 | */ | 9 | */ |
diff --git a/tests/utils/FakeConfigManager.php b/tests/utils/FakeConfigManager.php index 360b34a9..014c2af0 100644 --- a/tests/utils/FakeConfigManager.php +++ b/tests/utils/FakeConfigManager.php | |||
@@ -1,9 +1,13 @@ | |||
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace Shaarli; | ||
4 | |||
5 | use Shaarli\Config\ConfigManager; | ||
6 | |||
3 | /** | 7 | /** |
4 | * Fake ConfigManager | 8 | * Fake ConfigManager |
5 | */ | 9 | */ |
6 | class FakeConfigManager | 10 | class FakeConfigManager extends ConfigManager |
7 | { | 11 | { |
8 | protected $values = []; | 12 | protected $values = []; |
9 | 13 | ||
@@ -23,7 +27,7 @@ class FakeConfigManager | |||
23 | * @param string $key Key of the value to set | 27 | * @param string $key Key of the value to set |
24 | * @param mixed $value Value to set | 28 | * @param mixed $value Value to set |
25 | */ | 29 | */ |
26 | public function set($key, $value) | 30 | public function set($key, $value, $write = false, $isLoggedIn = false) |
27 | { | 31 | { |
28 | $this->values[$key] = $value; | 32 | $this->values[$key] = $value; |
29 | } | 33 | } |
@@ -35,7 +39,7 @@ class FakeConfigManager | |||
35 | * | 39 | * |
36 | * @return mixed The value if set, else the name of the key | 40 | * @return mixed The value if set, else the name of the key |
37 | */ | 41 | */ |
38 | public function get($key) | 42 | public function get($key, $default = '') |
39 | { | 43 | { |
40 | if (isset($this->values[$key])) { | 44 | if (isset($this->values[$key])) { |
41 | return $this->values[$key]; | 45 | return $this->values[$key]; |
diff --git a/tests/utils/ReferenceHistory.php b/tests/utils/ReferenceHistory.php index 516c9f51..aed5d2cf 100644 --- a/tests/utils/ReferenceHistory.php +++ b/tests/utils/ReferenceHistory.php | |||
@@ -1,6 +1,6 @@ | |||
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | use Shaarli\FileUtils; | 3 | use Shaarli\Helper\FileUtils; |
4 | use Shaarli\History; | 4 | use Shaarli\History; |
5 | 5 | ||
6 | /** | 6 | /** |
diff --git a/tests/utils/ReferenceLinkDB.php b/tests/utils/ReferenceLinkDB.php index fc3cb109..1f53dc3c 100644 --- a/tests/utils/ReferenceLinkDB.php +++ b/tests/utils/ReferenceLinkDB.php | |||
@@ -82,7 +82,7 @@ class ReferenceLinkDB | |||
82 | 'This guide extends and expands on PSR-1, the basic coding standard.', | 82 | 'This guide extends and expands on PSR-1, the basic coding standard.', |
83 | 0, | 83 | 0, |
84 | DateTime::createFromFormat(Bookmark::LINK_DATE_FORMAT, '20121206_152312'), | 84 | DateTime::createFromFormat(Bookmark::LINK_DATE_FORMAT, '20121206_152312'), |
85 | '' | 85 | 'coding-style standards quality assurance' |
86 | ); | 86 | ); |
87 | 87 | ||
88 | $this->addLink( | 88 | $this->addLink( |