diff options
Diffstat (limited to 'tests/legacy')
-rw-r--r-- | tests/legacy/LegacyControllerTest.php | 2 | ||||
-rw-r--r-- | tests/legacy/LegacyLinkDBTest.php | 12 | ||||
-rw-r--r-- | tests/legacy/LegacyLinkFilterTest.php | 2 | ||||
-rw-r--r-- | tests/legacy/LegacyUpdaterTest.php | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/tests/legacy/LegacyControllerTest.php b/tests/legacy/LegacyControllerTest.php index 4e52f3e1..1a2549a3 100644 --- a/tests/legacy/LegacyControllerTest.php +++ b/tests/legacy/LegacyControllerTest.php | |||
@@ -4,8 +4,8 @@ declare(strict_types=1); | |||
4 | 4 | ||
5 | namespace Shaarli\Legacy; | 5 | namespace Shaarli\Legacy; |
6 | 6 | ||
7 | use PHPUnit\Framework\TestCase; | ||
8 | use Shaarli\Front\Controller\Visitor\FrontControllerMockHelper; | 7 | use Shaarli\Front\Controller\Visitor\FrontControllerMockHelper; |
8 | use Shaarli\TestCase; | ||
9 | use Slim\Http\Request; | 9 | use Slim\Http\Request; |
10 | use Slim\Http\Response; | 10 | use Slim\Http\Response; |
11 | 11 | ||
diff --git a/tests/legacy/LegacyLinkDBTest.php b/tests/legacy/LegacyLinkDBTest.php index 819bc272..66746dfc 100644 --- a/tests/legacy/LegacyLinkDBTest.php +++ b/tests/legacy/LegacyLinkDBTest.php | |||
@@ -18,7 +18,7 @@ require_once 'tests/utils/ReferenceLinkDB.php'; | |||
18 | /** | 18 | /** |
19 | * Unitary tests for LegacyLinkDBTest | 19 | * Unitary tests for LegacyLinkDBTest |
20 | */ | 20 | */ |
21 | class LegacyLinkDBTest extends \PHPUnit\Framework\TestCase | 21 | class LegacyLinkDBTest extends \Shaarli\TestCase |
22 | { | 22 | { |
23 | // datastore to test write operations | 23 | // datastore to test write operations |
24 | protected static $testDatastore = 'sandbox/datastore.php'; | 24 | protected static $testDatastore = 'sandbox/datastore.php'; |
@@ -258,7 +258,7 @@ class LegacyLinkDBTest extends \PHPUnit\Framework\TestCase | |||
258 | $link = self::$publicLinkDB->getLinkFromUrl('http://mediagoblin.org/'); | 258 | $link = self::$publicLinkDB->getLinkFromUrl('http://mediagoblin.org/'); |
259 | 259 | ||
260 | $this->assertNotEquals(false, $link); | 260 | $this->assertNotEquals(false, $link); |
261 | $this->assertContains( | 261 | $this->assertContainsPolyfill( |
262 | 'A free software media publishing platform', | 262 | 'A free software media publishing platform', |
263 | $link['description'] | 263 | $link['description'] |
264 | ); | 264 | ); |
@@ -471,9 +471,9 @@ class LegacyLinkDBTest extends \PHPUnit\Framework\TestCase | |||
471 | 471 | ||
472 | $res = $linkDB->renameTag('cartoon', 'Taz'); | 472 | $res = $linkDB->renameTag('cartoon', 'Taz'); |
473 | $this->assertEquals(3, count($res)); | 473 | $this->assertEquals(3, count($res)); |
474 | $this->assertContains(' Taz ', $linkDB[4]['tags']); | 474 | $this->assertContainsPolyfill(' Taz ', $linkDB[4]['tags']); |
475 | $this->assertContains(' Taz ', $linkDB[1]['tags']); | 475 | $this->assertContainsPolyfill(' Taz ', $linkDB[1]['tags']); |
476 | $this->assertContains(' Taz ', $linkDB[0]['tags']); | 476 | $this->assertContainsPolyfill(' Taz ', $linkDB[0]['tags']); |
477 | } | 477 | } |
478 | 478 | ||
479 | /** | 479 | /** |
@@ -513,7 +513,7 @@ class LegacyLinkDBTest extends \PHPUnit\Framework\TestCase | |||
513 | 513 | ||
514 | $res = $linkDB->renameTag('cartoon', null); | 514 | $res = $linkDB->renameTag('cartoon', null); |
515 | $this->assertEquals(3, count($res)); | 515 | $this->assertEquals(3, count($res)); |
516 | $this->assertNotContains('cartoon', $linkDB[4]['tags']); | 516 | $this->assertNotContainsPolyfill('cartoon', $linkDB[4]['tags']); |
517 | } | 517 | } |
518 | 518 | ||
519 | /** | 519 | /** |
diff --git a/tests/legacy/LegacyLinkFilterTest.php b/tests/legacy/LegacyLinkFilterTest.php index 9db921a9..82bc93d8 100644 --- a/tests/legacy/LegacyLinkFilterTest.php +++ b/tests/legacy/LegacyLinkFilterTest.php | |||
@@ -10,7 +10,7 @@ use Shaarli\Legacy\LegacyLinkFilter; | |||
10 | /** | 10 | /** |
11 | * Class LegacyLinkFilterTest. | 11 | * Class LegacyLinkFilterTest. |
12 | */ | 12 | */ |
13 | class LegacyLinkFilterTest extends \PHPUnit\Framework\TestCase | 13 | class LegacyLinkFilterTest extends \Shaarli\TestCase |
14 | { | 14 | { |
15 | /** | 15 | /** |
16 | * @var string Test datastore path. | 16 | * @var string Test datastore path. |
diff --git a/tests/legacy/LegacyUpdaterTest.php b/tests/legacy/LegacyUpdaterTest.php index acfac530..0ddcb4a6 100644 --- a/tests/legacy/LegacyUpdaterTest.php +++ b/tests/legacy/LegacyUpdaterTest.php | |||
@@ -20,7 +20,7 @@ require_once 'inc/rain.tpl.class.php'; | |||
20 | * Class UpdaterTest. | 20 | * Class UpdaterTest. |
21 | * Runs unit tests against the updater class. | 21 | * Runs unit tests against the updater class. |
22 | */ | 22 | */ |
23 | class LegacyUpdaterTest extends \PHPUnit\Framework\TestCase | 23 | class LegacyUpdaterTest extends \Shaarli\TestCase |
24 | { | 24 | { |
25 | /** | 25 | /** |
26 | * @var string Path to test datastore. | 26 | * @var string Path to test datastore. |
@@ -725,7 +725,7 @@ $GLOBALS[\'privateLinkByDefault\'] = true;'; | |||
725 | $this->assertEquals(\Shaarli\Thumbnailer::MODE_ALL, $this->conf->get('thumbnails.mode')); | 725 | $this->assertEquals(\Shaarli\Thumbnailer::MODE_ALL, $this->conf->get('thumbnails.mode')); |
726 | $this->assertEquals(125, $this->conf->get('thumbnails.width')); | 726 | $this->assertEquals(125, $this->conf->get('thumbnails.width')); |
727 | $this->assertEquals(90, $this->conf->get('thumbnails.height')); | 727 | $this->assertEquals(90, $this->conf->get('thumbnails.height')); |
728 | $this->assertContains('You have enabled or changed thumbnails', $_SESSION['warnings'][0]); | 728 | $this->assertContainsPolyfill('You have enabled or changed thumbnails', $_SESSION['warnings'][0]); |
729 | } | 729 | } |
730 | 730 | ||
731 | /** | 731 | /** |