X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FFeedBuilderTest.php;h=460fb0c5a06299e45d8893895a6aa65c821b4344;hb=a34d6da642acda37b04e4c5d732d42a84df65068;hp=069b158154f4a3b7eafa516556d2e56bb3d1baec;hpb=89baf23ddfaf82cc663e26f76c307ef8e4bf4b02;p=github%2Fshaarli%2FShaarli.git diff --git a/tests/FeedBuilderTest.php b/tests/FeedBuilderTest.php index 069b1581..460fb0c5 100644 --- a/tests/FeedBuilderTest.php +++ b/tests/FeedBuilderTest.php @@ -76,7 +76,7 @@ class FeedBuilderTest extends PHPUnit_Framework_TestCase // Test headers (RSS) $this->assertEquals(self::$RSS_LANGUAGE, $data['language']); $this->assertEmpty($data['pubsubhub_url']); - $this->assertEquals('Tue, 10 Mar 2015 11:46:51 +0100', $data['last_update']); + $this->assertRegExp('/Tue, 10 Mar 2015 11:46:51 \+\d{4}/', $data['last_update']); $this->assertEquals(true, $data['show_dates']); $this->assertEquals('http://host.tld/index.php?do=feed', $data['self_link']); $this->assertEquals('http://host.tld/', $data['index_url']); @@ -88,12 +88,12 @@ class FeedBuilderTest extends PHPUnit_Framework_TestCase $this->assertEquals('20150310_114651', $link['linkdate']); $this->assertEquals('http://host.tld/?WDWyig', $link['guid']); $this->assertEquals('http://host.tld/?WDWyig', $link['url']); - $this->assertEquals('Tue, 10 Mar 2015 11:46:51 +0100', $link['iso_date']); + $this->assertRegExp('/Tue, 10 Mar 2015 11:46:51 \+\d{4}/', $link['iso_date']); $this->assertContains('Stallman has a beard', $link['description']); $this->assertContains('Permalink', $link['description']); $this->assertContains('http://host.tld/?WDWyig', $link['description']); $this->assertEquals(1, count($link['taglist'])); - $this->assertEquals('stuff', $link['taglist'][0]); + $this->assertEquals('sTuff', $link['taglist'][0]); // Test URL with external link. $this->assertEquals('https://static.fsf.org/nosvn/faif-2.0.pdf', $data['links']['20150310_114633']['url']); @@ -113,7 +113,7 @@ class FeedBuilderTest extends PHPUnit_Framework_TestCase $data = $feedBuilder->buildData(); $this->assertEquals(ReferenceLinkDB::$NB_LINKS_TOTAL, count($data['links'])); $link = array_shift($data['links']); - $this->assertEquals('2015-03-10T11:46:51+01:00', $link['iso_date']); + $this->assertRegExp('/2015-03-10T11:46:51\+\d{2}:+\d{2}/', $link['iso_date']); } /**