aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2018-10-13 01:40:04 +0200
committerVirtualTam <virtualtam@flibidi.net>2018-12-02 22:39:16 +0100
commit9d9f6d75b94aab51067bdfbe50b58b66d1194f6d (patch)
treeaa0e5743390296441edf09f44f95b3d21f2b5a16 /tests/api
parent067c2dd8f5f6eb6cc808ddc4bd30aec104caf73d (diff)
downloadShaarli-9d9f6d75b94aab51067bdfbe50b58b66d1194f6d.tar.gz
Shaarli-9d9f6d75b94aab51067bdfbe50b58b66d1194f6d.tar.zst
Shaarli-9d9f6d75b94aab51067bdfbe50b58b66d1194f6d.zip
lint: fix line-length warnings
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'tests/api')
-rw-r--r--tests/api/controllers/links/PostLinkTest.php8
-rw-r--r--tests/api/controllers/links/PutLinkTest.php8
2 files changed, 12 insertions, 4 deletions
diff --git a/tests/api/controllers/links/PostLinkTest.php b/tests/api/controllers/links/PostLinkTest.php
index 37617611..5c2b5623 100644
--- a/tests/api/controllers/links/PostLinkTest.php
+++ b/tests/api/controllers/links/PostLinkTest.php
@@ -127,7 +127,9 @@ class PostLinkTest extends TestCase
127 $this->assertEquals('', $data['description']); 127 $this->assertEquals('', $data['description']);
128 $this->assertEquals([], $data['tags']); 128 $this->assertEquals([], $data['tags']);
129 $this->assertEquals(false, $data['private']); 129 $this->assertEquals(false, $data['private']);
130 $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 );
131 $this->assertEquals('', $data['updated']); 133 $this->assertEquals('', $data['updated']);
132 134
133 $historyEntry = $this->history->getHistory()[0]; 135 $historyEntry = $this->history->getHistory()[0];
@@ -170,7 +172,9 @@ class PostLinkTest extends TestCase
170 $this->assertEquals($link['description'], $data['description']); 172 $this->assertEquals($link['description'], $data['description']);
171 $this->assertEquals($link['tags'], $data['tags']); 173 $this->assertEquals($link['tags'], $data['tags']);
172 $this->assertEquals(true, $data['private']); 174 $this->assertEquals(true, $data['private']);
173 $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 );
174 $this->assertEquals('', $data['updated']); 178 $this->assertEquals('', $data['updated']);
175 } 179 }
176 180
diff --git a/tests/api/controllers/links/PutLinkTest.php b/tests/api/controllers/links/PutLinkTest.php
index 72b895f2..f276b4c1 100644
--- a/tests/api/controllers/links/PutLinkTest.php
+++ b/tests/api/controllers/links/PutLinkTest.php
@@ -114,7 +114,9 @@ class PutLinkTest extends \PHPUnit_Framework_TestCase
114 \DateTime::createFromFormat('Ymd_His', '20150310_114651'), 114 \DateTime::createFromFormat('Ymd_His', '20150310_114651'),
115 \DateTime::createFromFormat(\DateTime::ATOM, $data['created']) 115 \DateTime::createFromFormat(\DateTime::ATOM, $data['created'])
116 ); 116 );
117 $this->assertTrue(new \DateTime('5 seconds ago') < \DateTime::createFromFormat(\DateTime::ATOM, $data['updated'])); 117 $this->assertTrue(
118 new \DateTime('5 seconds ago') < \DateTime::createFromFormat(\DateTime::ATOM, $data['updated'])
119 );
118 120
119 $historyEntry = $this->history->getHistory()[0]; 121 $historyEntry = $this->history->getHistory()[0];
120 $this->assertEquals(\History::UPDATED, $historyEntry['event']); 122 $this->assertEquals(\History::UPDATED, $historyEntry['event']);
@@ -159,7 +161,9 @@ class PutLinkTest extends \PHPUnit_Framework_TestCase
159 \DateTime::createFromFormat('Ymd_His', '20150310_114651'), 161 \DateTime::createFromFormat('Ymd_His', '20150310_114651'),
160 \DateTime::createFromFormat(\DateTime::ATOM, $data['created']) 162 \DateTime::createFromFormat(\DateTime::ATOM, $data['created'])
161 ); 163 );
162 $this->assertTrue(new \DateTime('5 seconds ago') < \DateTime::createFromFormat(\DateTime::ATOM, $data['updated'])); 164 $this->assertTrue(
165 new \DateTime('5 seconds ago') < \DateTime::createFromFormat(\DateTime::ATOM, $data['updated'])
166 );
163 } 167 }
164 168
165 /** 169 /**