diff options
author | Aurélien Tamisier <virtualtam+github@flibidi.net> | 2018-12-02 22:47:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-02 22:47:41 +0100 |
commit | 1004742f09b55ff781c13745781b9a7e90986faa (patch) | |
tree | aa0e5743390296441edf09f44f95b3d21f2b5a16 /tests/api/controllers/links/PostLinkTest.php | |
parent | 5e0a898bb13fad528514b0d33763bcaae38b45b0 (diff) | |
parent | 9d9f6d75b94aab51067bdfbe50b58b66d1194f6d (diff) | |
download | Shaarli-1004742f09b55ff781c13745781b9a7e90986faa.tar.gz Shaarli-1004742f09b55ff781c13745781b9a7e90986faa.tar.zst Shaarli-1004742f09b55ff781c13745781b9a7e90986faa.zip |
Merge pull request #1234 from virtualtam/lint
Setup PHPCS and cleanup linter configuration
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 | ||