namespacing: \Shaarli\Exceptions\IOException

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
VirtualTam 2018-12-02 23:31:40 +01:00
parent bdc5152d48
commit f3d2f25794
11 changed files with 24 additions and 10 deletions

View file

@ -1,5 +1,7 @@
<?php
use Shaarli\Exceptions\IOException;
require_once 'application/FileUtils.php';
/**
@ -48,7 +50,7 @@ class FileUtilsTest extends PHPUnit_Framework_TestCase
/**
* File not writable: raise an exception.
*
* @expectedException IOException
* @expectedException Shaarli\Exceptions\IOException
* @expectedExceptionMessage Error accessing "sandbox/flat.db"
*/
public function testWriteWithoutPermission()
@ -61,7 +63,7 @@ class FileUtilsTest extends PHPUnit_Framework_TestCase
/**
* Folder non existent: raise an exception.
*
* @expectedException IOException
* @expectedException Shaarli\Exceptions\IOException
* @expectedExceptionMessage Error accessing "nopefolder"
*/
public function testWriteFolderDoesNotExist()
@ -72,7 +74,7 @@ class FileUtilsTest extends PHPUnit_Framework_TestCase
/**
* Folder non writable: raise an exception.
*
* @expectedException IOException
* @expectedException Shaarli\Exceptions\IOException
* @expectedExceptionMessage Error accessing "sandbox"
*/
public function testWriteFolderPermission()

View file

@ -3,6 +3,8 @@
* Link datastore tests
*/
use Shaarli\Exceptions\IOException;
require_once 'application/Cache.php';
require_once 'application/FileUtils.php';
require_once 'application/LinkDB.php';
@ -100,7 +102,7 @@ class LinkDBTest extends PHPUnit_Framework_TestCase
/**
* Attempt to instantiate a LinkDB whereas the datastore is not writable
*
* @expectedException IOException
* @expectedException Shaarli\Exceptions\IOException
* @expectedExceptionMessageRegExp /Error accessing "null"/
*/
public function testConstructDatastoreNotWriteable()

View file

@ -111,7 +111,7 @@ class ConfigJsonTest extends \PHPUnit_Framework_TestCase
/**
* Write to invalid path.
*
* @expectedException \IOException
* @expectedException \Shaarli\Exceptions\IOException
*/
public function testWriteInvalidArray()
{
@ -122,7 +122,7 @@ class ConfigJsonTest extends \PHPUnit_Framework_TestCase
/**
* Write to invalid path.
*
* @expectedException \IOException
* @expectedException \Shaarli\Exceptions\IOException
*/
public function testWriteInvalidBlank()
{