diff options
Diffstat (limited to 'tests/api/controllers/links/PostLinkTest.php')
-rw-r--r-- | tests/api/controllers/links/PostLinkTest.php | 9 |
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 | ||
3 | namespace Shaarli\Api\Controllers; | 3 | namespace Shaarli\Api\Controllers; |
4 | 4 | ||
5 | |||
6 | use PHPUnit\Framework\TestCase; | 5 | use PHPUnit\Framework\TestCase; |
7 | use Shaarli\Config\ConfigManager; | 6 | use Shaarli\Config\ConfigManager; |
8 | use Slim\Container; | 7 | use 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 | ||