aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/api/controllers
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2019-01-12 23:19:15 +0100
committerVirtualTam <virtualtam@flibidi.net>2019-01-13 00:04:42 +0100
commita43e7842e44068584302ec1d6349155b571d9c96 (patch)
tree6f065b3e8a8f133d263092bc5fa93f4fb337e876 /tests/api/controllers
parent1a55fc8d639200aed4c0d3b0291a5dfd265de600 (diff)
downloadShaarli-a43e7842e44068584302ec1d6349155b571d9c96.tar.gz
Shaarli-a43e7842e44068584302ec1d6349155b571d9c96.tar.zst
Shaarli-a43e7842e44068584302ec1d6349155b571d9c96.zip
API: update test regexes to comply with PCRE2
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'tests/api/controllers')
-rw-r--r--tests/api/controllers/links/PostLinkTest.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/api/controllers/links/PostLinkTest.php b/tests/api/controllers/links/PostLinkTest.php
index ade07eeb..24e591db 100644
--- a/tests/api/controllers/links/PostLinkTest.php
+++ b/tests/api/controllers/links/PostLinkTest.php
@@ -121,7 +121,7 @@ class PostLinkTest extends TestCase
121 $data = json_decode((string) $response->getBody(), true); 121 $data = json_decode((string) $response->getBody(), true);
122 $this->assertEquals(self::NB_FIELDS_LINK, count($data)); 122 $this->assertEquals(self::NB_FIELDS_LINK, count($data));
123 $this->assertEquals(43, $data['id']); 123 $this->assertEquals(43, $data['id']);
124 $this->assertRegExp('/[\w-_]{6}/', $data['shorturl']); 124 $this->assertRegExp('/[\w_-]{6}/', $data['shorturl']);
125 $this->assertEquals('http://domain.tld/?' . $data['shorturl'], $data['url']); 125 $this->assertEquals('http://domain.tld/?' . $data['shorturl'], $data['url']);
126 $this->assertEquals('?' . $data['shorturl'], $data['title']); 126 $this->assertEquals('?' . $data['shorturl'], $data['title']);
127 $this->assertEquals('', $data['description']); 127 $this->assertEquals('', $data['description']);
@@ -166,7 +166,7 @@ class PostLinkTest extends TestCase
166 $data = json_decode((string) $response->getBody(), true); 166 $data = json_decode((string) $response->getBody(), true);
167 $this->assertEquals(self::NB_FIELDS_LINK, count($data)); 167 $this->assertEquals(self::NB_FIELDS_LINK, count($data));
168 $this->assertEquals(43, $data['id']); 168 $this->assertEquals(43, $data['id']);
169 $this->assertRegExp('/[\w-_]{6}/', $data['shorturl']); 169 $this->assertRegExp('/[\w_-]{6}/', $data['shorturl']);
170 $this->assertEquals('http://' . $link['url'], $data['url']); 170 $this->assertEquals('http://' . $link['url'], $data['url']);
171 $this->assertEquals($link['title'], $data['title']); 171 $this->assertEquals($link['title'], $data['title']);
172 $this->assertEquals($link['description'], $data['description']); 172 $this->assertEquals($link['description'], $data['description']);