]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - tests/FeedBuilderTest.php
Merge pull request #570 from ArthurHoaro/config-manager
[github/shaarli/Shaarli.git] / tests / FeedBuilderTest.php
index 069b158154f4a3b7eafa516556d2e56bb3d1baec..460fb0c5a06299e45d8893895a6aa65c821b4344 100644 (file)
@@ -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']);
     }
 
     /**