aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/FeedBuilderTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/FeedBuilderTest.php')
-rw-r--r--tests/FeedBuilderTest.php10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/FeedBuilderTest.php b/tests/FeedBuilderTest.php
index ea1dde25..06a44506 100644
--- a/tests/FeedBuilderTest.php
+++ b/tests/FeedBuilderTest.php
@@ -86,7 +86,7 @@ class FeedBuilderTest extends PHPUnit_Framework_TestCase
86 // Test first link (note link) 86 // Test first link (note link)
87 $link = reset($data['links']); 87 $link = reset($data['links']);
88 $this->assertEquals(41, $link['id']); 88 $this->assertEquals(41, $link['id']);
89 $this->assertEquals(DateTime::createFromFormat('Ymd_His', '20150310_114651'), $link['created']); 89 $this->assertEquals(DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, '20150310_114651'), $link['created']);
90 $this->assertEquals('http://host.tld/?WDWyig', $link['guid']); 90 $this->assertEquals('http://host.tld/?WDWyig', $link['guid']);
91 $this->assertEquals('http://host.tld/?WDWyig', $link['url']); 91 $this->assertEquals('http://host.tld/?WDWyig', $link['url']);
92 $this->assertRegExp('/Tue, 10 Mar 2015 11:46:51 \+\d{4}/', $link['pub_iso_date']); 92 $this->assertRegExp('/Tue, 10 Mar 2015 11:46:51 \+\d{4}/', $link['pub_iso_date']);
@@ -140,7 +140,7 @@ class FeedBuilderTest extends PHPUnit_Framework_TestCase
140 $this->assertEquals(1, count($data['links'])); 140 $this->assertEquals(1, count($data['links']));
141 $link = array_shift($data['links']); 141 $link = array_shift($data['links']);
142 $this->assertEquals(41, $link['id']); 142 $this->assertEquals(41, $link['id']);
143 $this->assertEquals(DateTime::createFromFormat('Ymd_His', '20150310_114651'), $link['created']); 143 $this->assertEquals(DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, '20150310_114651'), $link['created']);
144 } 144 }
145 145
146 /** 146 /**
@@ -157,7 +157,7 @@ class FeedBuilderTest extends PHPUnit_Framework_TestCase
157 $this->assertEquals(1, count($data['links'])); 157 $this->assertEquals(1, count($data['links']));
158 $link = array_shift($data['links']); 158 $link = array_shift($data['links']);
159 $this->assertEquals(41, $link['id']); 159 $this->assertEquals(41, $link['id']);
160 $this->assertEquals(DateTime::createFromFormat('Ymd_His', '20150310_114651'), $link['created']); 160 $this->assertEquals(DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, '20150310_114651'), $link['created']);
161 } 161 }
162 162
163 /** 163 /**
@@ -174,7 +174,7 @@ class FeedBuilderTest extends PHPUnit_Framework_TestCase
174 // First link is a permalink 174 // First link is a permalink
175 $link = array_shift($data['links']); 175 $link = array_shift($data['links']);
176 $this->assertEquals(41, $link['id']); 176 $this->assertEquals(41, $link['id']);
177 $this->assertEquals(DateTime::createFromFormat('Ymd_His', '20150310_114651'), $link['created']); 177 $this->assertEquals(DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, '20150310_114651'), $link['created']);
178 $this->assertEquals('http://host.tld/?WDWyig', $link['guid']); 178 $this->assertEquals('http://host.tld/?WDWyig', $link['guid']);
179 $this->assertEquals('http://host.tld/?WDWyig', $link['url']); 179 $this->assertEquals('http://host.tld/?WDWyig', $link['url']);
180 $this->assertContains('Direct link', $link['description']); 180 $this->assertContains('Direct link', $link['description']);
@@ -182,7 +182,7 @@ class FeedBuilderTest extends PHPUnit_Framework_TestCase
182 // Second link is a direct link 182 // Second link is a direct link
183 $link = array_shift($data['links']); 183 $link = array_shift($data['links']);
184 $this->assertEquals(8, $link['id']); 184 $this->assertEquals(8, $link['id']);
185 $this->assertEquals(DateTime::createFromFormat('Ymd_His', '20150310_114633'), $link['created']); 185 $this->assertEquals(DateTime::createFromFormat(LinkDB::LINK_DATE_FORMAT, '20150310_114633'), $link['created']);
186 $this->assertEquals('http://host.tld/?RttfEw', $link['guid']); 186 $this->assertEquals('http://host.tld/?RttfEw', $link['guid']);
187 $this->assertEquals('https://static.fsf.org/nosvn/faif-2.0.pdf', $link['url']); 187 $this->assertEquals('https://static.fsf.org/nosvn/faif-2.0.pdf', $link['url']);
188 $this->assertContains('Direct link', $link['description']); 188 $this->assertContains('Direct link', $link['description']);