]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/plugins/PluginPlayvideosTest.php
Compatibility with PHPUnit 9
[github/shaarli/Shaarli.git] / tests / plugins / PluginPlayvideosTest.php
index 29ad047f4a10ae608dd1d1b59bd057f40429ff9a..338d2e351a2344969a8d30e906a54edaca0b43e9 100644 (file)
@@ -1,22 +1,25 @@
 <?php
+namespace Shaarli\Plugin\Playvideos;
 
 /**
  * PluginPlayvideosTest.php
  */
 
+use Shaarli\Plugin\PluginManager;
+use Shaarli\Render\TemplatePage;
+
 require_once 'plugins/playvideos/playvideos.php';
-require_once 'application/Router.php';
 
 /**
  * Class PluginPlayvideosTest
  * Unit test for the PlayVideos plugin
  */
-class PluginPlayvideosTest extends PHPUnit_Framework_TestCase
+class PluginPlayvideosTest extends \Shaarli\TestCase
 {
     /**
      * Reset plugin path
      */
-    public function setUp()
+    protected function setUp(): void
     {
         PluginManager::$PLUGINS_PATH = 'plugins';
     }
@@ -28,7 +31,7 @@ class PluginPlayvideosTest extends PHPUnit_Framework_TestCase
     {
         $str = 'stuff';
         $data = array($str => $str);
-        $data['_PAGE_'] = Router::$PAGE_LINKLIST;
+        $data['_PAGE_'] = TemplatePage::LINKLIST;
 
         $data = hook_playvideos_render_header($data);
         $this->assertEquals($str, $data[$str]);
@@ -47,7 +50,7 @@ class PluginPlayvideosTest extends PHPUnit_Framework_TestCase
     {
         $str = 'stuff';
         $data = array($str => $str);
-        $data['_PAGE_'] = Router::$PAGE_LINKLIST;
+        $data['_PAGE_'] = TemplatePage::LINKLIST;
 
         $data = hook_playvideos_render_footer($data);
         $this->assertEquals($str, $data[$str]);