diff options
author | VirtualTam <virtualtam@flibidi.net> | 2017-03-03 23:06:12 +0100 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2017-03-04 17:07:52 +0100 |
commit | 3c66e56435359dc678048193e8ee239d06f79b64 (patch) | |
tree | 38a4be4a9d9babc193683feec412ac008ca9a169 /tests/config/ConfigJsonTest.php | |
parent | 74198dcdf65ee3dd83cbe5b6a8a85bc386a62063 (diff) | |
download | Shaarli-3c66e56435359dc678048193e8ee239d06f79b64.tar.gz Shaarli-3c66e56435359dc678048193e8ee239d06f79b64.tar.zst Shaarli-3c66e56435359dc678048193e8ee239d06f79b64.zip |
application: introduce the Shaarli\Config namespace
Namespaces have been introduced with the REST API, and should be generalized
to the whole codebase to manage object scope and benefit from autoloading.
See:
- https://secure.php.net/manual/en/language.namespaces.php
- http://www.php-fig.org/psr/psr-4/
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'tests/config/ConfigJsonTest.php')
-rw-r--r-- | tests/config/ConfigJsonTest.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/config/ConfigJsonTest.php b/tests/config/ConfigJsonTest.php index 07f6ab49..3527f83d 100644 --- a/tests/config/ConfigJsonTest.php +++ b/tests/config/ConfigJsonTest.php | |||
@@ -1,11 +1,10 @@ | |||
1 | <?php | 1 | <?php |
2 | 2 | namespace Shaarli\Config; | |
3 | require_once 'application/config/ConfigJson.php'; | ||
4 | 3 | ||
5 | /** | 4 | /** |
6 | * Class ConfigJsonTest | 5 | * Class ConfigJsonTest |
7 | */ | 6 | */ |
8 | class ConfigJsonTest extends PHPUnit_Framework_TestCase | 7 | class ConfigJsonTest extends \PHPUnit_Framework_TestCase |
9 | { | 8 | { |
10 | /** | 9 | /** |
11 | * @var ConfigJson | 10 | * @var ConfigJson |
@@ -40,7 +39,7 @@ class ConfigJsonTest extends PHPUnit_Framework_TestCase | |||
40 | /** | 39 | /** |
41 | * Read a non existent config file -> empty array. | 40 | * Read a non existent config file -> empty array. |
42 | * | 41 | * |
43 | * @expectedException Exception | 42 | * @expectedException \Exception |
44 | * @expectedExceptionMessage An error occurred while parsing JSON file: error code #4 | 43 | * @expectedExceptionMessage An error occurred while parsing JSON file: error code #4 |
45 | */ | 44 | */ |
46 | public function testReadInvalidJson() | 45 | public function testReadInvalidJson() |
@@ -112,7 +111,7 @@ class ConfigJsonTest extends PHPUnit_Framework_TestCase | |||
112 | /** | 111 | /** |
113 | * Write to invalid path. | 112 | * Write to invalid path. |
114 | * | 113 | * |
115 | * @expectedException IOException | 114 | * @expectedException \IOException |
116 | */ | 115 | */ |
117 | public function testWriteInvalidArray() | 116 | public function testWriteInvalidArray() |
118 | { | 117 | { |
@@ -123,7 +122,7 @@ class ConfigJsonTest extends PHPUnit_Framework_TestCase | |||
123 | /** | 122 | /** |
124 | * Write to invalid path. | 123 | * Write to invalid path. |
125 | * | 124 | * |
126 | * @expectedException IOException | 125 | * @expectedException \IOException |
127 | */ | 126 | */ |
128 | public function testWriteInvalidBlank() | 127 | public function testWriteInvalidBlank() |
129 | { | 128 | { |