]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/plugins/PluginQrcodeTest.php
Process main page (linklist) through Slim controller
[github/shaarli/Shaarli.git] / tests / plugins / PluginQrcodeTest.php
index 211ee89c4a0755bb7ed66f360c474e3b120d14ad..c9f8c733d40adcac140fc2bdb5fe8ab817123f6c 100644 (file)
@@ -1,22 +1,26 @@
 <?php
+namespace Shaarli\Plugin\Qrcode;
 
 /**
  * PluginQrcodeTest.php
  */
 
+use Shaarli\Plugin\PluginManager;
+use Shaarli\Render\TemplatePage;
+
 require_once 'plugins/qrcode/qrcode.php';
-require_once 'application/Router.php';
 
 /**
  * Class PluginQrcodeTest
  * Unit test for the QR-Code plugin
  */
-class PluginQrcodeTest extends PHPUnit_Framework_TestCase
+class PluginQrcodeTest extends \PHPUnit\Framework\TestCase
 {
     /**
      * Reset plugin path
      */
-    public function setUp() {
+    public function setUp()
+    {
         PluginManager::$PLUGINS_PATH = 'plugins';
     }
 
@@ -53,7 +57,7 @@ class PluginQrcodeTest extends PHPUnit_Framework_TestCase
     {
         $str = 'stuff';
         $data = array($str => $str);
-        $data['_PAGE_'] = Router::$PAGE_LINKLIST;
+        $data['_PAGE_'] = TemplatePage::LINKLIST;
 
         $data = hook_qrcode_render_footer($data);
         $this->assertEquals($str, $data[$str]);