aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api/controllers/links/PostLinkTest.php
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2019-02-23 16:27:33 +0100
committerVirtualTam <virtualtam@flibidi.net>2019-02-23 16:27:33 +0100
commit43c77f658a905e2def6aeca4c092683977cd0c55 (patch)
treecb0dc273a315a777847d251f856625b2fc779c04 /tests/api/controllers/links/PostLinkTest.php
parent630ebca2b6359e942e5b6c057cca2b6069c1093a (diff)
parent1826e383ecf501302974132fd443cf1ca06e10f6 (diff)
downloadShaarli-43c77f658a905e2def6aeca4c092683977cd0c55.tar.gz
Shaarli-43c77f658a905e2def6aeca4c092683977cd0c55.tar.zst
Shaarli-43c77f658a905e2def6aeca4c092683977cd0c55.zip
Merge commit '1826e383ecf501302974132fd443cf1ca06e10f6' into v0.10
Diffstat (limited to 'tests/api/controllers/links/PostLinkTest.php')
-rw-r--r--tests/api/controllers/links/PostLinkTest.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/api/controllers/links/PostLinkTest.php b/tests/api/controllers/links/PostLinkTest.php
index 100a9170..5c2b5623 100644
--- a/tests/api/controllers/links/PostLinkTest.php
+++ b/tests/api/controllers/links/PostLinkTest.php
@@ -2,7 +2,6 @@
2 2
3namespace Shaarli\Api\Controllers; 3namespace Shaarli\Api\Controllers;
4 4
5
6use PHPUnit\Framework\TestCase; 5use PHPUnit\Framework\TestCase;
7use Shaarli\Config\ConfigManager; 6use Shaarli\Config\ConfigManager;
8use Slim\Container; 7use Slim\Container;
@@ -128,7 +127,9 @@ class PostLinkTest extends TestCase
128 $this->assertEquals('', $data['description']); 127 $this->assertEquals('', $data['description']);
129 $this->assertEquals([], $data['tags']); 128 $this->assertEquals([], $data['tags']);
130 $this->assertEquals(false, $data['private']); 129 $this->assertEquals(false, $data['private']);
131 $this->assertTrue(new \DateTime('5 seconds ago') < \DateTime::createFromFormat(\DateTime::ATOM, $data['created'])); 130 $this->assertTrue(
131 new \DateTime('5 seconds ago') < \DateTime::createFromFormat(\DateTime::ATOM, $data['created'])
132 );
132 $this->assertEquals('', $data['updated']); 133 $this->assertEquals('', $data['updated']);
133 134
134 $historyEntry = $this->history->getHistory()[0]; 135 $historyEntry = $this->history->getHistory()[0];
@@ -171,7 +172,9 @@ class PostLinkTest extends TestCase
171 $this->assertEquals($link['description'], $data['description']); 172 $this->assertEquals($link['description'], $data['description']);
172 $this->assertEquals($link['tags'], $data['tags']); 173 $this->assertEquals($link['tags'], $data['tags']);
173 $this->assertEquals(true, $data['private']); 174 $this->assertEquals(true, $data['private']);
174 $this->assertTrue(new \DateTime('2 seconds ago') < \DateTime::createFromFormat(\DateTime::ATOM, $data['created'])); 175 $this->assertTrue(
176 new \DateTime('2 seconds ago') < \DateTime::createFromFormat(\DateTime::ATOM, $data['created'])
177 );
175 $this->assertEquals('', $data['updated']); 178 $this->assertEquals('', $data['updated']);
176 } 179 }
177 180