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

Commit

Permalink
Merge remote-tracking branch 'weierophinney/feature/registry-remove-s…
Browse files Browse the repository at this point in the history
…ingleton'
  • Loading branch information
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 36 deletions.
4 changes: 0 additions & 4 deletions test/Reader/Entry/AtomStandaloneEntryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ class AtomStandaloneEntryTest extends \PHPUnit_Framework_TestCase
public function setup()
{
Reader\Reader::reset();
if (\Zend\Registry::isRegistered('Zend_Locale')) {
$registry = \Zend\Registry::getInstance();
unset($registry['Zend_Locale']);
}
$this->_feedSamplePath = dirname(__FILE__) . '/_files/AtomStandaloneEntry';
$this->_options = Date\Date::setOptions();
foreach($this->_options as $k=>$v) {
Expand Down
4 changes: 0 additions & 4 deletions test/Reader/Entry/AtomTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@ class AtomTest extends \PHPUnit_Framework_TestCase
public function setup()
{
Reader\Reader::reset();
if (\Zend\Registry::isRegistered('Zend_Locale')) {
$registry = \Zend\Registry::getInstance();
unset($registry['Zend_Locale']);
}
$this->_feedSamplePath = dirname(__FILE__) . '/_files/Atom';
$this->_options = Date\Date::setOptions();
foreach($this->_options as $k=>$v) {
Expand Down
4 changes: 0 additions & 4 deletions test/Reader/Entry/CommonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@ class CommonTest extends \PHPUnit_Framework_TestCase
public function setup()
{
Reader\Reader::reset();
if (\Zend\Registry::isRegistered('Zend_Locale')) {
$registry = \Zend\Registry::getInstance();
unset($registry['Zend_Locale']);
}
$this->_feedSamplePath = dirname(__FILE__) . '/_files/Common';
}

Expand Down
6 changes: 0 additions & 6 deletions test/Reader/Entry/RssTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ class RssTest extends \PHPUnit_Framework_TestCase
public function setup()
{
Reader\Reader::reset();
if (\Zend\Registry::isRegistered('Zend_Locale')) {
$registry = \Zend\Registry::getInstance();
unset($registry['Zend_Locale']);
}
$this->_feedSamplePath = dirname(__FILE__) . '/_files/Rss';
$this->_options = Date\Date::setOptions();
foreach($this->_options as $k=>$v) {
Expand Down Expand Up @@ -1902,15 +1898,13 @@ public function testGetsDateModifiedFromRss20()
public function testParsesCorrectDateIfMissingOffsetWhenSystemUsesUSLocale()
{
$locale = new \Zend\Locale\Locale('en_US');
\Zend\Registry::set('Zend_Locale', $locale);
$feed = Reader\Reader::importString(
file_get_contents($this->_feedSamplePath.'/datemodified/plain/rss20_en_US.xml')
);
$entry = $feed->current();
$fdate = $entry->getDateModified();
$edate = new Date\Date;
$edate->set('2010-01-04T02:14:00-0600', Date\Date::ISO_8601);
\Zend\Registry::getInstance()->offsetUnset('Zend_Locale');
$this->assertTrue($edate->equals($fdate));
}

Expand Down
4 changes: 0 additions & 4 deletions test/Reader/Feed/AtomSourceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ class AtomSourceTest extends \PHPUnit_Framework_TestCase
public function setup()
{
Reader\Reader::reset();
if (\Zend\Registry::isRegistered('Zend_Locale')) {
$registry = \Zend\Registry::getInstance();
unset($registry['Zend_Locale']);
}
$this->_feedSamplePath = dirname(__FILE__) . '/_files/AtomSource';
$this->_options = Date\Date::setOptions();
foreach($this->_options as $k=>$v) {
Expand Down
4 changes: 0 additions & 4 deletions test/Reader/Feed/AtomTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ class AtomTest extends \PHPUnit_Framework_TestCase
public function setup()
{
Reader\Reader::reset();
if (\Zend\Registry::isRegistered('Zend_Locale')) {
$registry = \Zend\Registry::getInstance();
unset($registry['Zend_Locale']);
}
$this->_feedSamplePath = dirname(__FILE__) . '/_files/Atom';
$this->_options = Date\Date::setOptions();
foreach($this->_options as $k=>$v) {
Expand Down
4 changes: 0 additions & 4 deletions test/Reader/Feed/CommonTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,6 @@ class CommonTest extends \PHPUnit_Framework_TestCase
public function setup()
{
Reader\Reader::reset();
if (\Zend\Registry::isRegistered('Zend_Locale')) {
$registry = \Zend\Registry::getInstance();
unset($registry['Zend_Locale']);
}
$this->_feedSamplePath = dirname(__FILE__) . '/_files/Common';
}

Expand Down
6 changes: 0 additions & 6 deletions test/Reader/Feed/RssTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ class RssTest extends \PHPUnit_Framework_TestCase
public function setup()
{
Reader\Reader::reset();
if (\Zend\Registry::isRegistered('Zend_Locale')) {
$registry = \Zend\Registry::getInstance();
unset($registry['Zend_Locale']);
}
$this->_feedSamplePath = dirname(__FILE__) . '/_files/Rss';
$this->_options = Date\Date::setOptions();
foreach($this->_options as $k=>$v) {
Expand Down Expand Up @@ -2138,14 +2134,12 @@ public function testGetsDateModifiedFromRss20()
public function testParsesCorrectDateIfMissingOffsetWhenSystemUsesUSLocale()
{
$locale = new \Zend\Locale\Locale('en_US');
\Zend\Registry::set('Zend_Locale', $locale);
$feed = Reader\Reader::importString(
file_get_contents($this->_feedSamplePath.'/datemodified/plain/rss20_en_US.xml')
);
$fdate = $feed->getDateModified();
$edate = new Date\Date;
$edate->set('2010-01-04T02:14:00-0600', Date\Date::ISO_8601);
\Zend\Registry::getInstance()->offsetUnset('Zend_Locale');
$this->assertTrue($edate->equals($fdate));
}

Expand Down

0 comments on commit 634cf99

Please sign in to comment.