Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Merge pull request zendframework/zendframework#5369 from ThaDafinser/…
Browse files Browse the repository at this point in the history
…phpUnitWindows

Php unit windows
  • Loading branch information
weierophinney committed Oct 30, 2013
197 parents 8ea6767 + 8793888 + 163d706 + a197876 + dc04d82 + e296dd4 + 8cd607e + 758e5c3 + 59f3ba8 + 63d873e + a320b87 + 911d7bc + 5b99e49 + 916ccaf + 363002c + de6a155 + 81d4652 + 8677f66 + bea2340 + 53107b1 + e575de9 + c8a932b + d08629f + a04474f + 3fef53d + 1f4b9ed + d263f1c + c790aed + 412585a + b5e6b02 + 9ac81f3 + 9f28eab + 2e7e2e2 + 7c64770 + b82fa59 + 4190868 + 3a6b7ad + 8e745f6 + bab7086 + c5a5d19 + b468bc1 + d79794c + 508b344 + d16deed + f38e96a + c4a3687 + 54465f7 + 4ad15e4 + 9aa47da + 619d24d + ddfa8f2 + 8e7172b + e5fc69f + 284a721 + 6d3db4c + b99e8c3 + a52dcef + 1d21066 + cccc24c + 81bd699 + dfb38ed + b796f3d + d49dbc2 + 547433c + 0c9ce04 + a76e26a + 2914396 + 7ca3746 + f1b292d + 406112f + 5a9edd3 + f65c9f6 + c54156c + 5e55e82 + 352e42b + fa459f5 + 3eff137 + 3648ab6 + 4096125 + 0037391 + 9bdfcd9 + 6cd1498 + ecac99d + 199ed75 + b8507f7 + ef400bd + decb6ae + 860b39d + 243eca6 + d56af72 + 1aaf7f9 + 26b27a9 + 40cd50e + 986898b + d2780b7 + 49abb1d + cb5a738 + 21d3bef + 4748875 + 3331086 + bfed36c + b56e9b8 + 765b017 + b2cddce + 1c63803 + dd490e0 + c0425c2 + 128ed7f + 4d88940 + 94b3f1e + 9a0d8cf + 12135ad + 1169a58 + 6cdb5dc + 15950e5 + 7e68fb2 + 4bda4a9 + 537893f + 4cf10f8 + dd5b294 + 3ac5190 + 63d8503 + de5ff9e + f8868a0 + e3f8a27 + 634cf99 + c2cd236 + 189672f + d50054c + 8fb183a + 81a21d6 + ba78039 + 2cc9607 + bbd31f7 + aff5dfd + 3daad46 + a2bd1ba + cddc550 + eadb29a + 339c074 + 543ff20 + 732e048 + 8ec7eaf + 25fde7d + 5215c37 + a31404d + 1328e20 + 33a507b + 012928d + 379d601 + b7d4bbd + c1c633c + 6a72de0 + 7968e2e + 51d3d2a + 7e58137 + abedf39 + 896ef54 + cf89f92 + 0df0d18 + 3d7cc47 + 8abd6e8 + e20a954 + 2f039d3 + 88c06cc + 3e03422 + 096a05e + 6c7650a + a4c7b54 + ef5460e + 898d44f + c554ea2 + ffcf7bc + 2adc6bf + 4179b4d + 5907ce0 + fc664b1 + 2ee9d9a + 7fb5cbc + acda3d1 + 6db0d22 + 2bbd38f + 3144a5b + 7efb048 + 3d18a84 + 93a97aa + f98796f + 853fff2 + 149db66 + 2416664 + ed3d22e + 08c425e + 9675758 + 2a8daeb + 7e876e2 + ef2ccfa + 68b23c7 commit 97f0cea
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 10 deletions.
4 changes: 3 additions & 1 deletion test/Reader/Entry/CommonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 3 additions & 1 deletion test/Reader/Feed/CommonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
24 changes: 16 additions & 8 deletions test/Reader/Integration/PodcastRss2Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand All @@ -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()
Expand Down
5 changes: 5 additions & 0 deletions test/Reader/ReaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,11 @@ public function testRegistersUserExtension()
$this->assertTrue(Reader\Reader::isRegistered('JungleBooks'));
}

/**
* This test is failing on windows:
* Failed asserting that exception of type "Zend\Feed\Reader\Exception\RuntimeException" matches expected exception "Zend\Feed\Reader\Exception\InvalidArgumentException". Message was: "DOMDocument cannot parse XML: Entity 'discloseInfo' failed to parse".
* @todo why is the assertEquals commented out?
*/
public function testXxePreventionOnFeedParsing()
{
$this->setExpectedException('Zend\Feed\Reader\Exception\InvalidArgumentException');
Expand Down
2 changes: 2 additions & 0 deletions test/Writer/FeedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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);
}

Expand Down

0 comments on commit 97f0cea

Please sign in to comment.