diff options
author | VirtualTam <virtualtam@flibidi.net> | 2018-12-02 23:31:40 +0100 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2019-01-12 22:47:48 +0100 |
commit | f3d2f257946e2a3c8791c1ba99b379acbe934fec (patch) | |
tree | 7f66543d9a21fd4e8c90f0ed00adde0a62d1205d /tests | |
parent | bdc5152d486ca75372c271f94623b248bc127800 (diff) | |
download | Shaarli-f3d2f257946e2a3c8791c1ba99b379acbe934fec.tar.gz Shaarli-f3d2f257946e2a3c8791c1ba99b379acbe934fec.tar.zst Shaarli-f3d2f257946e2a3c8791c1ba99b379acbe934fec.zip |
namespacing: \Shaarli\Exceptions\IOException
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/FileUtilsTest.php | 8 | ||||
-rw-r--r-- | tests/LinkDBTest.php | 4 | ||||
-rw-r--r-- | tests/config/ConfigJsonTest.php | 4 |
3 files changed, 10 insertions, 6 deletions
diff --git a/tests/FileUtilsTest.php b/tests/FileUtilsTest.php index d764e495..9596dba9 100644 --- a/tests/FileUtilsTest.php +++ b/tests/FileUtilsTest.php | |||
@@ -1,5 +1,7 @@ | |||
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | use Shaarli\Exceptions\IOException; | ||
4 | |||
3 | require_once 'application/FileUtils.php'; | 5 | require_once 'application/FileUtils.php'; |
4 | 6 | ||
5 | /** | 7 | /** |
@@ -48,7 +50,7 @@ class FileUtilsTest extends PHPUnit_Framework_TestCase | |||
48 | /** | 50 | /** |
49 | * File not writable: raise an exception. | 51 | * File not writable: raise an exception. |
50 | * | 52 | * |
51 | * @expectedException IOException | 53 | * @expectedException Shaarli\Exceptions\IOException |
52 | * @expectedExceptionMessage Error accessing "sandbox/flat.db" | 54 | * @expectedExceptionMessage Error accessing "sandbox/flat.db" |
53 | */ | 55 | */ |
54 | public function testWriteWithoutPermission() | 56 | public function testWriteWithoutPermission() |
@@ -61,7 +63,7 @@ class FileUtilsTest extends PHPUnit_Framework_TestCase | |||
61 | /** | 63 | /** |
62 | * Folder non existent: raise an exception. | 64 | * Folder non existent: raise an exception. |
63 | * | 65 | * |
64 | * @expectedException IOException | 66 | * @expectedException Shaarli\Exceptions\IOException |
65 | * @expectedExceptionMessage Error accessing "nopefolder" | 67 | * @expectedExceptionMessage Error accessing "nopefolder" |
66 | */ | 68 | */ |
67 | public function testWriteFolderDoesNotExist() | 69 | public function testWriteFolderDoesNotExist() |
@@ -72,7 +74,7 @@ class FileUtilsTest extends PHPUnit_Framework_TestCase | |||
72 | /** | 74 | /** |
73 | * Folder non writable: raise an exception. | 75 | * Folder non writable: raise an exception. |
74 | * | 76 | * |
75 | * @expectedException IOException | 77 | * @expectedException Shaarli\Exceptions\IOException |
76 | * @expectedExceptionMessage Error accessing "sandbox" | 78 | * @expectedExceptionMessage Error accessing "sandbox" |
77 | */ | 79 | */ |
78 | public function testWriteFolderPermission() | 80 | public function testWriteFolderPermission() |
diff --git a/tests/LinkDBTest.php b/tests/LinkDBTest.php index c763c0cb..9b2f35e6 100644 --- a/tests/LinkDBTest.php +++ b/tests/LinkDBTest.php | |||
@@ -3,6 +3,8 @@ | |||
3 | * Link datastore tests | 3 | * Link datastore tests |
4 | */ | 4 | */ |
5 | 5 | ||
6 | use Shaarli\Exceptions\IOException; | ||
7 | |||
6 | require_once 'application/Cache.php'; | 8 | require_once 'application/Cache.php'; |
7 | require_once 'application/FileUtils.php'; | 9 | require_once 'application/FileUtils.php'; |
8 | require_once 'application/LinkDB.php'; | 10 | require_once 'application/LinkDB.php'; |
@@ -100,7 +102,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase | |||
100 | /** | 102 | /** |
101 | * Attempt to instantiate a LinkDB whereas the datastore is not writable | 103 | * Attempt to instantiate a LinkDB whereas the datastore is not writable |
102 | * | 104 | * |
103 | * @expectedException IOException | 105 | * @expectedException Shaarli\Exceptions\IOException |
104 | * @expectedExceptionMessageRegExp /Error accessing "null"/ | 106 | * @expectedExceptionMessageRegExp /Error accessing "null"/ |
105 | */ | 107 | */ |
106 | public function testConstructDatastoreNotWriteable() | 108 | public function testConstructDatastoreNotWriteable() |
diff --git a/tests/config/ConfigJsonTest.php b/tests/config/ConfigJsonTest.php index d237bc80..99c1ea56 100644 --- a/tests/config/ConfigJsonTest.php +++ b/tests/config/ConfigJsonTest.php | |||
@@ -111,7 +111,7 @@ class ConfigJsonTest extends \PHPUnit_Framework_TestCase | |||
111 | /** | 111 | /** |
112 | * Write to invalid path. | 112 | * Write to invalid path. |
113 | * | 113 | * |
114 | * @expectedException \IOException | 114 | * @expectedException \Shaarli\Exceptions\IOException |
115 | */ | 115 | */ |
116 | public function testWriteInvalidArray() | 116 | public function testWriteInvalidArray() |
117 | { | 117 | { |
@@ -122,7 +122,7 @@ class ConfigJsonTest extends \PHPUnit_Framework_TestCase | |||
122 | /** | 122 | /** |
123 | * Write to invalid path. | 123 | * Write to invalid path. |
124 | * | 124 | * |
125 | * @expectedException \IOException | 125 | * @expectedException \Shaarli\Exceptions\IOException |
126 | */ | 126 | */ |
127 | public function testWriteInvalidBlank() | 127 | public function testWriteInvalidBlank() |
128 | { | 128 | { |