]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/api/controllers/GetLinksTest.php
REST API: implements getLink by ID service
[github/shaarli/Shaarli.git] / tests / api / controllers / GetLinksTest.php
similarity index 98%
rename from tests/api/controllers/LinksTest.php
rename to tests/api/controllers/GetLinksTest.php
index 284c3a9da94625b3713a50551640a90b51fadd59..da54fcf12ba31c98babdd50e6ebbc9aa5260ca0d 100644 (file)
@@ -9,14 +9,15 @@ use Slim\Http\Request;
 use Slim\Http\Response;
 
 /**
- * Class LinksTest
+ * Class GetLinksTest
  *
- * Test Links REST API services.
- * Note that api call results are tightly related to data contained in ReferenceLinkDB.
+ * Test get Link list REST API service.
+ *
+ * @see http://shaarli.github.io/api-documentation/#links-links-collection-get
  *
  * @package Shaarli\Api\Controllers
  */
-class LinksTest extends \PHPUnit_Framework_TestCase
+class GetLinksTest extends \PHPUnit_Framework_TestCase
 {
     /**
      * @var string datastore to test write operations
@@ -53,7 +54,7 @@ class LinksTest extends \PHPUnit_Framework_TestCase
      */
     public function setUp()
     {
-        $this->conf = new \ConfigManager('tests/utils/config/configJson.json.php');
+        $this->conf = new \ConfigManager('tests/utils/config/configJson');
         $this->refDB = new \ReferenceLinkDB();
         $this->refDB->write(self::$testDatastore);
 
@@ -100,7 +101,7 @@ class LinksTest extends \PHPUnit_Framework_TestCase
             $this->assertEquals($order[$cpt++], $link['id']);
         }
 
-        // Check first element fields\
+        // Check first element fields
         $first = $data[0];
         $this->assertEquals('http://domain.tld/?WDWyig', $first['url']);
         $this->assertEquals('WDWyig', $first['shorturl']);