Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ZendTest\Feed: also \r\n related errors

  • Loading branch information...
commit 2981d8655cab9c5b654532d66fac8d924e733ea6 1 parent fc032fd
@ThaDafinser authored
View
4 tests/ZendTest/Feed/Reader/Entry/CommonTest.php
@@ -72,7 +72,9 @@ public function testSaveXmlOutputsXmlStringForEntry()
file_get_contents($this->feedSamplePath.'/atom.xml')
);
$entry = $feed->current();
- $this->assertEquals($entry->saveXml(), file_get_contents($this->feedSamplePath.'/atom_rewrittenbydom.xml'));
+ $expected = file_get_contents($this->feedSamplePath.'/atom_rewrittenbydom.xml');
+ $expected = str_replace("\r\n", "\n", $expected);
+ $this->assertEquals($expected, $entry->saveXml());
}
public function testGetsNamedExtension()
View
4 tests/ZendTest/Feed/Reader/Feed/CommonTest.php
@@ -66,7 +66,9 @@ public function testSaveXmlOutputsXmlStringForFeed()
$feed = Reader\Reader::importString(
file_get_contents($this->feedSamplePath.'/atom.xml')
);
- $this->assertEquals($feed->saveXml(), file_get_contents($this->feedSamplePath.'/atom_rewrittenbydom.xml'));
+ $expected = file_get_contents($this->feedSamplePath.'/atom_rewrittenbydom.xml');
+ $expected = str_replace("\r\n", "\n", $expected);
+ $this->assertEquals($expected, $feed->saveXml());
}
public function testGetsNamedExtension()
View
24 tests/ZendTest/Feed/Reader/Integration/PodcastRss2Test.php
@@ -96,10 +96,12 @@ public function testGetsDescription()
$feed = Reader\Reader::importString(
file_get_contents($this->feedSamplePath)
);
- $this->assertEquals('All About Everything is a show about everything.
+ $expected = 'All About Everything is a show about everything.
Each week we dive into any subject known to man and talk
about it as much as we can. Look for our Podcast in the
- iTunes Store', $feed->getDescription());
+ iTunes Store';
+ $expected = str_replace("\r\n", "\n", $expected);
+ $this->assertEquals($expected, $feed->getDescription());
}
public function testGetsLanguage()
@@ -205,8 +207,10 @@ public function testGetsSubtitle()
file_get_contents($this->feedSamplePath)
);
$entry = $feed->current();
- $this->assertEquals('A short primer on table spices
- ', $entry->getSubtitle());
+ $expected = 'A short primer on table spices
+ ';
+ $expected = str_replace("\r\n", "\n", $expected);
+ $this->assertEquals($expected, $entry->getSubtitle());
}
public function testGetsSummary()
@@ -215,10 +219,12 @@ public function testGetsSummary()
file_get_contents($this->feedSamplePath)
);
$entry = $feed->current();
- $this->assertEquals('This week we talk about salt and pepper
+ $expected = 'This week we talk about salt and pepper
shakers, comparing and contrasting pour rates,
construction materials, and overall aesthetics. Come and
- join the party!', $entry->getSummary());
+ join the party!';
+ $expected = str_replace("\r\n", "\n", $expected);
+ $this->assertEquals($expected, $entry->getSummary());
}
public function testGetsDuration()
@@ -236,8 +242,10 @@ public function testGetsKeywords()
file_get_contents($this->feedSamplePath)
);
$entry = $feed->current();
- $this->assertEquals('salt, pepper, shaker, exciting
- ', $entry->getKeywords());
+ $expected = 'salt, pepper, shaker, exciting
+ ';
+ $expected = str_replace("\r\n", "\n", $expected);
+ $this->assertEquals($expected, $entry->getKeywords());
}
public function testGetsEntryEncoding()
View
2  tests/ZendTest/Feed/Writer/FeedTest.php
@@ -1021,6 +1021,7 @@ public function testExportRss()
EOT;
$feed = str_replace('%version%', Version::VERSION, $feed);
+ $feed = str_replace("\r\n", "\n", $feed);
$this->assertEquals($feed, $export);
}
@@ -1042,6 +1043,7 @@ public function testExportRssIgnoreExceptions()
EOT;
$feed = str_replace('%version%', Version::VERSION, $feed);
+ $feed = str_replace("\r\n", "\n", $feed);
$this->assertEquals($feed, $export);
}
Please sign in to comment.
Something went wrong with that request. Please try again.