diff options
Diffstat (limited to 'tests/FileUtilsTest.php')
-rw-r--r-- | tests/FileUtilsTest.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/FileUtilsTest.php b/tests/FileUtilsTest.php index d764e495..57719175 100644 --- a/tests/FileUtilsTest.php +++ b/tests/FileUtilsTest.php | |||
@@ -1,13 +1,15 @@ | |||
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | require_once 'application/FileUtils.php'; | 3 | namespace Shaarli; |
4 | |||
5 | use Exception; | ||
4 | 6 | ||
5 | /** | 7 | /** |
6 | * Class FileUtilsTest | 8 | * Class FileUtilsTest |
7 | * | 9 | * |
8 | * Test file utility class. | 10 | * Test file utility class. |
9 | */ | 11 | */ |
10 | class FileUtilsTest extends PHPUnit_Framework_TestCase | 12 | class FileUtilsTest extends \PHPUnit\Framework\TestCase |
11 | { | 13 | { |
12 | /** | 14 | /** |
13 | * @var string Test file path. | 15 | * @var string Test file path. |
@@ -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() |