Permalink
Browse files

[TESTS] Fix bad assumptions in Feed tests

- Was using hard-coded version string, instead of current VERSION
  constant. Updated.
  • Loading branch information...
weierophinney committed Sep 18, 2012
1 parent 92b79c5 commit cc87e8a71999b115870e7200d012cc31ec97637a
Showing with 7 additions and 2 deletions.
  1. +7 −2 tests/ZendTest/Feed/Writer/FeedTest.php
@@ -13,6 +13,7 @@
use DateTime;
use Zend\Feed\Writer;
use Zend\Feed\Writer\Feed;
+use Zend\Version\Version;
/**
* @category Zend
@@ -1017,12 +1018,14 @@ public function testExportRss()
<channel>
<title>foo</title>
<description>bar</description>
- <generator>Zend_Feed_Writer 2.0.1 (http://framework.zend.com)</generator>
+ <generator>Zend_Feed_Writer %VERSION% (http://framework.zend.com)</generator>
<link>http://www.example.org</link>
</channel>
</rss>
EOT;
+ $version = Version::VERSION;
+ $feed = str_replace('%VERSION%', $version, $feed);
$this->assertEquals($feed, $export);
}
@@ -1038,11 +1041,13 @@ public function testExportRssIgnoreExceptions()
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
- <generator>Zend_Feed_Writer 2.0.1 (http://framework.zend.com)</generator>
+ <generator>Zend_Feed_Writer %VERSION% (http://framework.zend.com)</generator>
</channel>
</rss>
EOT;
+ $version = Version::VERSION;
+ $feed = str_replace('%VERSION%', $version, $feed);
$this->assertEquals($feed, $export);
}

0 comments on commit cc87e8a

Please sign in to comment.