aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2018-12-03 01:22:45 +0100
committerVirtualTam <virtualtam@flibidi.net>2019-01-12 22:47:48 +0100
commit6696729b88e67504fdd333cbaab43a63c3617d86 (patch)
treef617e4108e0a2d41278935f4a2b4528f49e70c6d /tests
parentf24896b237e40718fb6eaa2869592eb0855a47fd (diff)
downloadShaarli-6696729b88e67504fdd333cbaab43a63c3617d86.tar.gz
Shaarli-6696729b88e67504fdd333cbaab43a63c3617d86.tar.zst
Shaarli-6696729b88e67504fdd333cbaab43a63c3617d86.zip
namespacing: \Shaarli\Bookmark\LinkFilter
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'tests')
-rw-r--r--tests/bookmark/LinkDBTest.php6
-rw-r--r--tests/bookmark/LinkFilterTest.php (renamed from tests/LinkFilterTest.php)23
2 files changed, 17 insertions, 12 deletions
diff --git a/tests/bookmark/LinkDBTest.php b/tests/bookmark/LinkDBTest.php
index f18a3155..65409e95 100644
--- a/tests/bookmark/LinkDBTest.php
+++ b/tests/bookmark/LinkDBTest.php
@@ -6,7 +6,7 @@
6namespace Shaarli\Bookmark; 6namespace Shaarli\Bookmark;
7 7
8use DateTime; 8use DateTime;
9use LinkNotFoundException; 9use Shaarli\Bookmark\Exception\LinkNotFoundException;
10use ReferenceLinkDB; 10use ReferenceLinkDB;
11use ReflectionClass; 11use ReflectionClass;
12use Shaarli; 12use Shaarli;
@@ -457,7 +457,7 @@ class LinkDBTest extends \PHPUnit\Framework\TestCase
457 /** 457 /**
458 * Test filterHash() with an invalid smallhash. 458 * Test filterHash() with an invalid smallhash.
459 * 459 *
460 * @expectedException LinkNotFoundException 460 * @expectedException \Shaarli\Bookmark\Exception\LinkNotFoundException
461 */ 461 */
462 public function testFilterHashInValid1() 462 public function testFilterHashInValid1()
463 { 463 {
@@ -468,7 +468,7 @@ class LinkDBTest extends \PHPUnit\Framework\TestCase
468 /** 468 /**
469 * Test filterHash() with an empty smallhash. 469 * Test filterHash() with an empty smallhash.
470 * 470 *
471 * @expectedException LinkNotFoundException 471 * @expectedException \Shaarli\Bookmark\Exception\LinkNotFoundException
472 */ 472 */
473 public function testFilterHashInValid() 473 public function testFilterHashInValid()
474 { 474 {
diff --git a/tests/LinkFilterTest.php b/tests/bookmark/LinkFilterTest.php
index db28b1c4..808f8122 100644
--- a/tests/LinkFilterTest.php
+++ b/tests/bookmark/LinkFilterTest.php
@@ -1,13 +1,14 @@
1<?php 1<?php
2 2
3use Shaarli\Bookmark\LinkDB; 3namespace Shaarli\Bookmark;
4 4
5require_once 'application/LinkFilter.php'; 5use Exception;
6use ReferenceLinkDB;
6 7
7/** 8/**
8 * Class LinkFilterTest. 9 * Class LinkFilterTest.
9 */ 10 */
10class LinkFilterTest extends PHPUnit_Framework_TestCase 11class LinkFilterTest extends \PHPUnit\Framework\TestCase
11{ 12{
12 /** 13 /**
13 * @var string Test datastore path. 14 * @var string Test datastore path.
@@ -29,7 +30,7 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase
29 protected static $linkDB; 30 protected static $linkDB;
30 31
31 /** 32 /**
32 * Instanciate linkFilter with ReferenceLinkDB data. 33 * Instantiate linkFilter with ReferenceLinkDB data.
33 */ 34 */
34 public static function setUpBeforeClass() 35 public static function setUpBeforeClass()
35 { 36 {
@@ -81,10 +82,14 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase
81 count( 82 count(
82 self::$linkFilter->filter( 83 self::$linkFilter->filter(
83 LinkFilter::$FILTER_TAG, 84 LinkFilter::$FILTER_TAG,
84 /*$request=*/'', 85 /*$request=*/
85 /*$casesensitive=*/false, 86 '',
86 /*$visibility=*/'all', 87 /*$casesensitive=*/
87 /*$untaggedonly=*/true 88 false,
89 /*$visibility=*/
90 'all',
91 /*$untaggedonly=*/
92 true
88 ) 93 )
89 ) 94 )
90 ); 95 );
@@ -229,7 +234,7 @@ class LinkFilterTest extends PHPUnit_Framework_TestCase
229 /** 234 /**
230 * No link for this hash 235 * No link for this hash
231 * 236 *
232 * @expectedException LinkNotFoundException 237 * @expectedException \Shaarli\Bookmark\Exception\LinkNotFoundException
233 */ 238 */
234 public function testFilterUnknownSmallHash() 239 public function testFilterUnknownSmallHash()
235 { 240 {