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

Commit

Permalink
Merge branch 'hotfix/ZF-9197' of https://github.com/thomasweidner/zf2
Browse files Browse the repository at this point in the history
…into hotfix/zf-9197

Conflicts:
	library/Zend/Filter/InputFilter.php
	tests/Zend/Filter/InputTest.php
  • Loading branch information
weierophinney committed Aug 25, 2011
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/FactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,17 @@
*/
class FactoryTest extends \PHPUnit_Framework_TestCase
{

/**
* Stores the original set timezone
* @var string
*/
private $_originaltimezone;

public function setUp()
{
$this->_originaltimezone = date_default_timezone_get();

// Set timezone to avoid "It is not safe to rely on the system's timezone settings."
// message if timezone is not set within php.ini
date_default_timezone_set('GMT');
Expand All @@ -53,6 +62,7 @@ public function tearDown()
Barcode\Barcode::setPluginLoader($loader, Barcode\Barcode::OBJECT);
$loader = new PrefixPathLoader(array('Zend\Barcode\Renderer' => 'Zend/Barcode/Renderer'));
Barcode\Barcode::setPluginLoader($loader, Barcode\Barcode::RENDERER);
date_default_timezone_set($this->_originaltimezone);
}

public function testMinimalFactory()
Expand Down
9 changes: 9 additions & 0 deletions test/Renderer/TestCommon.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,18 @@ abstract class TestCommon extends \PHPUnit_Framework_TestCase
*/
protected $_renderer = null;

/**
* Stores the original set timezone
* @var string
*/
private $_originaltimezone;

abstract protected function _getRendererObject($options = null);

public function setUp()
{
$this->_originaltimezone = date_default_timezone_get();

// Set timezone to avoid "It is not safe to rely on the system's timezone settings."
// message if timezone is not set within php.ini
date_default_timezone_set('GMT');
Expand All @@ -59,6 +67,7 @@ public function setUp()
public function tearDown()
{
Barcode\Barcode::setBarcodeFont(null);
date_default_timezone_set($this->_originaltimezone);
}

public function testSetBarcodeObject()
Expand Down

0 comments on commit 18ecd64

Please sign in to comment.