aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/feed
diff options
context:
space:
mode:
Diffstat (limited to 'tests/feed')
-rw-r--r--tests/feed/FeedBuilderTest.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/feed/FeedBuilderTest.php b/tests/feed/FeedBuilderTest.php
index b2b70b70..5c2aaedb 100644
--- a/tests/feed/FeedBuilderTest.php
+++ b/tests/feed/FeedBuilderTest.php
@@ -90,15 +90,15 @@ class FeedBuilderTest extends \PHPUnit\Framework\TestCase
90 $link = $data['links'][array_keys($data['links'])[2]]; 90 $link = $data['links'][array_keys($data['links'])[2]];
91 $this->assertEquals(41, $link['id']); 91 $this->assertEquals(41, $link['id']);
92 $this->assertEquals(DateTime::createFromFormat(Bookmark::LINK_DATE_FORMAT, '20150310_114651'), $link['created']); 92 $this->assertEquals(DateTime::createFromFormat(Bookmark::LINK_DATE_FORMAT, '20150310_114651'), $link['created']);
93 $this->assertEquals('http://host.tld/?WDWyig', $link['guid']); 93 $this->assertEquals('http://host.tld/shaare/WDWyig', $link['guid']);
94 $this->assertEquals('http://host.tld/?WDWyig', $link['url']); 94 $this->assertEquals('http://host.tld/shaare/WDWyig', $link['url']);
95 $this->assertRegExp('/Tue, 10 Mar 2015 11:46:51 \+\d{4}/', $link['pub_iso_date']); 95 $this->assertRegExp('/Tue, 10 Mar 2015 11:46:51 \+\d{4}/', $link['pub_iso_date']);
96 $pub = DateTime::createFromFormat(DateTime::RSS, $link['pub_iso_date']); 96 $pub = DateTime::createFromFormat(DateTime::RSS, $link['pub_iso_date']);
97 $up = DateTime::createFromFormat(DateTime::ATOM, $link['up_iso_date']); 97 $up = DateTime::createFromFormat(DateTime::ATOM, $link['up_iso_date']);
98 $this->assertEquals($pub, $up); 98 $this->assertEquals($pub, $up);
99 $this->assertContains('Stallman has a beard', $link['description']); 99 $this->assertContains('Stallman has a beard', $link['description']);
100 $this->assertContains('Permalink', $link['description']); 100 $this->assertContains('Permalink', $link['description']);
101 $this->assertContains('http://host.tld/?WDWyig', $link['description']); 101 $this->assertContains('http://host.tld/shaare/WDWyig', $link['description']);
102 $this->assertEquals(1, count($link['taglist'])); 102 $this->assertEquals(1, count($link['taglist']));
103 $this->assertEquals('sTuff', $link['taglist'][0]); 103 $this->assertEquals('sTuff', $link['taglist'][0]);
104 104
@@ -198,15 +198,15 @@ class FeedBuilderTest extends \PHPUnit\Framework\TestCase
198 $link = $data['links'][array_keys($data['links'])[2]]; 198 $link = $data['links'][array_keys($data['links'])[2]];
199 $this->assertEquals(41, $link['id']); 199 $this->assertEquals(41, $link['id']);
200 $this->assertEquals(DateTime::createFromFormat(Bookmark::LINK_DATE_FORMAT, '20150310_114651'), $link['created']); 200 $this->assertEquals(DateTime::createFromFormat(Bookmark::LINK_DATE_FORMAT, '20150310_114651'), $link['created']);
201 $this->assertEquals('http://host.tld/?WDWyig', $link['guid']); 201 $this->assertEquals('http://host.tld/shaare/WDWyig', $link['guid']);
202 $this->assertEquals('http://host.tld/?WDWyig', $link['url']); 202 $this->assertEquals('http://host.tld/shaare/WDWyig', $link['url']);
203 $this->assertContains('Direct link', $link['description']); 203 $this->assertContains('Direct link', $link['description']);
204 $this->assertContains('http://host.tld/?WDWyig', $link['description']); 204 $this->assertContains('http://host.tld/shaare/WDWyig', $link['description']);
205 // Second link is a direct link 205 // Second link is a direct link
206 $link = $data['links'][array_keys($data['links'])[3]]; 206 $link = $data['links'][array_keys($data['links'])[3]];
207 $this->assertEquals(8, $link['id']); 207 $this->assertEquals(8, $link['id']);
208 $this->assertEquals(DateTime::createFromFormat(Bookmark::LINK_DATE_FORMAT, '20150310_114633'), $link['created']); 208 $this->assertEquals(DateTime::createFromFormat(Bookmark::LINK_DATE_FORMAT, '20150310_114633'), $link['created']);
209 $this->assertEquals('http://host.tld/?RttfEw', $link['guid']); 209 $this->assertEquals('http://host.tld/shaare/RttfEw', $link['guid']);
210 $this->assertEquals('https://static.fsf.org/nosvn/faif-2.0.pdf', $link['url']); 210 $this->assertEquals('https://static.fsf.org/nosvn/faif-2.0.pdf', $link['url']);
211 $this->assertContains('Direct link', $link['description']); 211 $this->assertContains('Direct link', $link['description']);
212 $this->assertContains('https://static.fsf.org/nosvn/faif-2.0.pdf', $link['description']); 212 $this->assertContains('https://static.fsf.org/nosvn/faif-2.0.pdf', $link['description']);
@@ -271,8 +271,8 @@ class FeedBuilderTest extends \PHPUnit\Framework\TestCase
271 271
272 // Test first link (note link) 272 // Test first link (note link)
273 $link = $data['links'][array_keys($data['links'])[2]]; 273 $link = $data['links'][array_keys($data['links'])[2]];
274 $this->assertEquals('http://host.tld:8080/~user/shaarli/?WDWyig', $link['guid']); 274 $this->assertEquals('http://host.tld:8080/~user/shaarli/shaare/WDWyig', $link['guid']);
275 $this->assertEquals('http://host.tld:8080/~user/shaarli/?WDWyig', $link['url']); 275 $this->assertEquals('http://host.tld:8080/~user/shaarli/shaare/WDWyig', $link['url']);
276 $this->assertContains('http://host.tld:8080/~user/shaarli/./add-tag/hashtag', $link['description']); 276 $this->assertContains('http://host.tld:8080/~user/shaarli/./add-tag/hashtag', $link['description']);
277 } 277 }
278} 278}