aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/legacy
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2020-09-29 14:41:40 +0200
committerArthurHoaro <arthur@hoa.ro>2020-09-29 18:57:20 +0200
commita5a9cf23acd1248585173aa32757d9720b5f2d62 (patch)
tree5b443e09fc0f84db0cb478cda0c88c10346b0843 /tests/legacy
parent2b7a7bc928fb7fc171138e248d3aa1d86d5b62f9 (diff)
downloadShaarli-a5a9cf23acd1248585173aa32757d9720b5f2d62.tar.gz
Shaarli-a5a9cf23acd1248585173aa32757d9720b5f2d62.tar.zst
Shaarli-a5a9cf23acd1248585173aa32757d9720b5f2d62.zip
Compatibility with PHPUnit 9
Diffstat (limited to 'tests/legacy')
-rw-r--r--tests/legacy/LegacyControllerTest.php2
-rw-r--r--tests/legacy/LegacyLinkDBTest.php12
-rw-r--r--tests/legacy/LegacyLinkFilterTest.php2
-rw-r--r--tests/legacy/LegacyUpdaterTest.php4
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
5namespace Shaarli\Legacy; 5namespace Shaarli\Legacy;
6 6
7use PHPUnit\Framework\TestCase;
8use Shaarli\Front\Controller\Visitor\FrontControllerMockHelper; 7use Shaarli\Front\Controller\Visitor\FrontControllerMockHelper;
8use Shaarli\TestCase;
9use Slim\Http\Request; 9use Slim\Http\Request;
10use Slim\Http\Response; 10use 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 */
21class LegacyLinkDBTest extends \PHPUnit\Framework\TestCase 21class 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 */
13class LegacyLinkFilterTest extends \PHPUnit\Framework\TestCase 13class 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 */
23class LegacyUpdaterTest extends \PHPUnit\Framework\TestCase 23class 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 /**