namespacing: \Shaarli\Bookmark\LinkFilter

Signed-off-by: VirtualTam <virtualtam@flibidi.net>
This commit is contained in:
VirtualTam 2018-12-03 01:22:45 +01:00
parent f24896b237
commit 6696729b88
8 changed files with 66 additions and 50 deletions

View file

@ -6,7 +6,7 @@
namespace Shaarli\Bookmark;
use DateTime;
use LinkNotFoundException;
use Shaarli\Bookmark\Exception\LinkNotFoundException;
use ReferenceLinkDB;
use ReflectionClass;
use Shaarli;
@ -457,7 +457,7 @@ class LinkDBTest extends \PHPUnit\Framework\TestCase
/**
* Test filterHash() with an invalid smallhash.
*
* @expectedException LinkNotFoundException
* @expectedException \Shaarli\Bookmark\Exception\LinkNotFoundException
*/
public function testFilterHashInValid1()
{
@ -468,7 +468,7 @@ class LinkDBTest extends \PHPUnit\Framework\TestCase
/**
* Test filterHash() with an empty smallhash.
*
* @expectedException LinkNotFoundException
* @expectedException \Shaarli\Bookmark\Exception\LinkNotFoundException
*/
public function testFilterHashInValid()
{

View file

@ -1,13 +1,14 @@
<?php
use Shaarli\Bookmark\LinkDB;
namespace Shaarli\Bookmark;
require_once 'application/LinkFilter.php';
use Exception;
use ReferenceLinkDB;
/**
* Class LinkFilterTest.
*/
class LinkFilterTest extends PHPUnit_Framework_TestCase
class LinkFilterTest extends \PHPUnit\Framework\TestCase
{
/**
* @var string Test datastore path.
@ -29,7 +30,7 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase
protected static $linkDB;
/**
* Instanciate linkFilter with ReferenceLinkDB data.
* Instantiate linkFilter with ReferenceLinkDB data.
*/
public static function setUpBeforeClass()
{
@ -81,10 +82,14 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase
count(
self::$linkFilter->filter(
LinkFilter::$FILTER_TAG,
/*$request=*/'',
/*$casesensitive=*/false,
/*$visibility=*/'all',
/*$untaggedonly=*/true
/*$request=*/
'',
/*$casesensitive=*/
false,
/*$visibility=*/
'all',
/*$untaggedonly=*/
true
)
)
);
@ -229,7 +234,7 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase
/**
* No link for this hash
*
* @expectedException LinkNotFoundException
* @expectedException \Shaarli\Bookmark\Exception\LinkNotFoundException
*/
public function testFilterUnknownSmallHash()
{