aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api/controllers/links/GetLinksTest.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2019-07-27 12:30:33 +0200
committerArthurHoaro <arthur@hoa.ro>2019-07-27 12:30:33 +0200
commit1b8ed48a0d3964186f4d66d443783f4d250e7147 (patch)
tree23597f312507ba0c1b461755b9aa086106374a4d /tests/api/controllers/links/GetLinksTest.php
parent1aa24ed8d2974cda98733f74b36844b02942cc11 (diff)
parented3365325d231e044dedc32608fde87b1b39fa34 (diff)
downloadShaarli-1b8ed48a0d3964186f4d66d443783f4d250e7147.tar.gz
Shaarli-1b8ed48a0d3964186f4d66d443783f4d250e7147.tar.zst
Shaarli-1b8ed48a0d3964186f4d66d443783f4d250e7147.zip
Merge tag 'v0.11.0' into latest
Release v0.11.0
Diffstat (limited to 'tests/api/controllers/links/GetLinksTest.php')
-rw-r--r--tests/api/controllers/links/GetLinksTest.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/api/controllers/links/GetLinksTest.php b/tests/api/controllers/links/GetLinksTest.php
index 64f02774..711a3152 100644
--- a/tests/api/controllers/links/GetLinksTest.php
+++ b/tests/api/controllers/links/GetLinksTest.php
@@ -1,8 +1,8 @@
1<?php 1<?php
2namespace Shaarli\Api\Controllers; 2namespace Shaarli\Api\Controllers;
3 3
4use Shaarli\Bookmark\LinkDB;
4use Shaarli\Config\ConfigManager; 5use Shaarli\Config\ConfigManager;
5
6use Slim\Container; 6use Slim\Container;
7use Slim\Http\Environment; 7use Slim\Http\Environment;
8use Slim\Http\Request; 8use Slim\Http\Request;
@@ -17,7 +17,7 @@ use Slim\Http\Response;
17 * 17 *
18 * @package Shaarli\Api\Controllers 18 * @package Shaarli\Api\Controllers
19 */ 19 */
20class GetLinksTest extends \PHPUnit_Framework_TestCase 20class GetLinksTest extends \PHPUnit\Framework\TestCase
21{ 21{
22 /** 22 /**
23 * @var string datastore to test write operations 23 * @var string datastore to test write operations
@@ -60,7 +60,7 @@ class GetLinksTest extends \PHPUnit_Framework_TestCase
60 60
61 $this->container = new Container(); 61 $this->container = new Container();
62 $this->container['conf'] = $this->conf; 62 $this->container['conf'] = $this->conf;
63 $this->container['db'] = new \LinkDB(self::$testDatastore, true, false); 63 $this->container['db'] = new LinkDB(self::$testDatastore, true, false);
64 $this->container['history'] = null; 64 $this->container['history'] = null;
65 65
66 $this->controller = new Links($this->container); 66 $this->controller = new Links($this->container);
@@ -114,7 +114,7 @@ class GetLinksTest extends \PHPUnit_Framework_TestCase
114 $this->assertEquals('sTuff', $first['tags'][0]); 114 $this->assertEquals('sTuff', $first['tags'][0]);
115 $this->assertEquals(false, $first['private']); 115 $this->assertEquals(false, $first['private']);
116 $this->assertEquals( 116 $this->assertEquals(
117 \DateTime::createFromFormat(\LinkDB::LINK_DATE_FORMAT, '20150310_114651')->format(\DateTime::ATOM), 117 \DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, '20150310_114651')->format(\DateTime::ATOM),
118 $first['created'] 118 $first['created']
119 ); 119 );
120 $this->assertEmpty($first['updated']); 120 $this->assertEmpty($first['updated']);
@@ -125,7 +125,7 @@ class GetLinksTest extends \PHPUnit_Framework_TestCase
125 125
126 // Update date 126 // Update date
127 $this->assertEquals( 127 $this->assertEquals(
128 \DateTime::createFromFormat(\LinkDB::LINK_DATE_FORMAT, '20160803_093033')->format(\DateTime::ATOM), 128 \DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, '20160803_093033')->format(\DateTime::ATOM),
129 $link['updated'] 129 $link['updated']
130 ); 130 );
131 } 131 }