]> 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 7ee924004a983c549bed06c1f614d75eea4610e1..338d2e351a2344969a8d30e906a54edaca0b43e9 100644 (file)
@@ -1,24 +1,25 @@
 <?php
+namespace Shaarli\Plugin\Playvideos;
 
 /**
  * PluginPlayvideosTest.php
  */
 
-use Shaarli\Router;
+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';
     }
@@ -30,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]);
@@ -49,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]);