From a43e7842e44068584302ec1d6349155b571d9c96 Mon Sep 17 00:00:00 2001 From: VirtualTam Date: Sat, 12 Jan 2019 23:19:15 +0100 Subject: API: update test regexes to comply with PCRE2 Signed-off-by: VirtualTam --- tests/api/controllers/links/PostLinkTest.php | 4 ++-- 1 file 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 $data = json_decode((string) $response->getBody(), true); $this->assertEquals(self::NB_FIELDS_LINK, count($data)); $this->assertEquals(43, $data['id']); - $this->assertRegExp('/[\w-_]{6}/', $data['shorturl']); + $this->assertRegExp('/[\w_-]{6}/', $data['shorturl']); $this->assertEquals('http://domain.tld/?' . $data['shorturl'], $data['url']); $this->assertEquals('?' . $data['shorturl'], $data['title']); $this->assertEquals('', $data['description']); @@ -166,7 +166,7 @@ class PostLinkTest extends TestCase $data = json_decode((string) $response->getBody(), true); $this->assertEquals(self::NB_FIELDS_LINK, count($data)); $this->assertEquals(43, $data['id']); - $this->assertRegExp('/[\w-_]{6}/', $data['shorturl']); + $this->assertRegExp('/[\w_-]{6}/', $data['shorturl']); $this->assertEquals('http://' . $link['url'], $data['url']); $this->assertEquals($link['title'], $data['title']); $this->assertEquals($link['description'], $data['description']); -- cgit v1.2.3