diff --git a/library/Zend/Serializer/Adapter/PythonPickle.php b/library/Zend/Serializer/Adapter/PythonPickle.php index 468c02db56..aae13729f6 100644 --- a/library/Zend/Serializer/Adapter/PythonPickle.php +++ b/library/Zend/Serializer/Adapter/PythonPickle.php @@ -99,11 +99,6 @@ class Zend_Serializer_Adapter_PythonPickle extends Zend_Serializer_Adapter_Adapt const OP_BINBYTES = 'B'; // push bytes; counted binary string argument const OP_SHORT_BINBYTES = 'C'; // " " ; " " " " < 256 bytes - /** - * @var bool Whether or not this is a PHP 6 binary - */ - protected static $_isPhp6 = null; - /** * @var bool Whether or not the system is little-endian */ @@ -155,9 +150,6 @@ public function __construct($opts=array()) if (self::$_isLittleEndian === null) { self::$_isLittleEndian = (pack('l', 1) === "\x01\x00\x00\x00"); } - if (self::$_isPhp6 === null) { - self::$_isPhp6 = !version_compare(PHP_VERSION, '6.0.0', '<'); - } $this->_marker = new stdClass(); } @@ -1103,10 +1095,6 @@ protected function _loadUnicode() $pattern = '/\\\\u([a-fA-F0-9]{4})/u'; // \uXXXX $data = preg_replace_callback($pattern, array($this, '_convertMatchingUnicodeSequence2Utf8'), $data); - if (self::$_isPhp6) { - $data = unicode_decode($data, 'UTF-8'); - } - $this->_stack[] = $data; } @@ -1172,10 +1160,6 @@ protected function _loadBinUnicode() list(, $n) = unpack('l', $n); $data = $this->_read($n); - if (self::$_isPhp6) { - $data = unicode_decode($data, 'UTF-8'); - } - $this->_stack[] = $data; } diff --git a/tests/Zend/DateTest.php b/tests/Zend/DateTest.php index 2b2e057eeb..03b9dd19a2 100644 --- a/tests/Zend/DateTest.php +++ b/tests/Zend/DateTest.php @@ -5522,7 +5522,7 @@ public function testUsePhpNFormat() Zend_Date::setOptions(array('format_type' => 'php')); date_default_timezone_set('GMT'); - $date = new Zend_Date(mktime(20,10,0,09,20,2009)); + $date = new Zend_Date(mktime(20,10,0,9,20,2009)); $this->assertSame(gmdate('w',$date->getTimestamp()), $date->toString( 'w')); $this->assertSame(gmdate('d',$date->getTimestamp()), $date->toString( 'd')); $this->assertSame(gmdate('D',$date->getTimestamp()), $date->toString('D', 'en')); @@ -5561,7 +5561,7 @@ public function testUsePhpNFormat() $this->assertSame(gmdate('U',$date->getTimestamp()), $date->toString( 'U')); date_default_timezone_set('Indian/Maldives'); - $date = new Zend_Date(mktime(20,10,0,09,20,2009)); + $date = new Zend_Date(mktime(20,10,0,9,20,2009)); $this->assertSame(date('w',$date->getTimestamp()), $date->toString( 'w')); $this->assertSame(date('d',$date->getTimestamp()), $date->toString( 'd')); $this->assertSame(date('D',$date->getTimestamp()), $date->toString('D', 'en')); diff --git a/tests/Zend/Log/Writer/AbstractTest.php b/tests/Zend/Log/Writer/AbstractTest.php index bbb6d01fe0..45b0e517c0 100644 --- a/tests/Zend/Log/Writer/AbstractTest.php +++ b/tests/Zend/Log/Writer/AbstractTest.php @@ -37,6 +37,9 @@ */ class Zend_Log_Writer_AbstractTest extends PHPUnit_Framework_TestCase { + /** + * @var Zend_Log_Writer_Abstract + */ protected $_writer; public static function main() @@ -55,6 +58,10 @@ protected function setUp() */ public function testSetFormatter() { + if (version_compare(phpversion(), '7', '>=')) { + $this->markTestSkipped('Invalid typehinting is PHP Fatal error in PHP7+'); + } + require_once 'Zend/Log/Formatter/Simple.php'; $this->_writer->setFormatter(new Zend_Log_Formatter_Simple()); $this->setExpectedException('PHPUnit_Framework_Error'); diff --git a/tests/Zend/Log/Writer/DbTest.php b/tests/Zend/Log/Writer/DbTest.php index e22783d4eb..548d2005c9 100644 --- a/tests/Zend/Log/Writer/DbTest.php +++ b/tests/Zend/Log/Writer/DbTest.php @@ -138,6 +138,10 @@ public function testFactory() */ public function testThrowStrictSetFormatter() { + if (version_compare(phpversion(), '7', '>=')) { + $this->markTestSkipped('Invalid typehinting is PHP Fatal error in PHP7+'); + } + try { $this->writer->setFormatter(new StdClass()); } catch (Exception $e) { diff --git a/tests/Zend/Serializer/Adapter/PhpCodeTest.php b/tests/Zend/Serializer/Adapter/PhpCodeTest.php index a2ebcd4e31..aa7387880e 100644 --- a/tests/Zend/Serializer/Adapter/PhpCodeTest.php +++ b/tests/Zend/Serializer/Adapter/PhpCodeTest.php @@ -141,6 +141,9 @@ public function testUnserializeObject() public function testUnserialzeInvalid() { + if (version_compare(phpversion(), '7', '>=')) { + $this->markTestSkipped('Evaling of invalid input is PHP Parse error in PHP7+'); + } $value = 'not a serialized string'; $this->setExpectedException('Zend_Serializer_Exception'); $this->_adapter->unserialize($value); diff --git a/tests/Zend/Service/DeveloperGarden/OfflineSecurityTokenServerTest.php b/tests/Zend/Service/DeveloperGarden/OfflineSecurityTokenServerTest.php index 2d153a153b..d8648d3dbf 100644 --- a/tests/Zend/Service/DeveloperGarden/OfflineSecurityTokenServerTest.php +++ b/tests/Zend/Service/DeveloperGarden/OfflineSecurityTokenServerTest.php @@ -164,6 +164,10 @@ public function testGetTokenFromCache() public function testSetTokenToCache1stParamException() { + if (version_compare(phpversion(), '7', '>=')) { + $this->markTestSkipped('Invalid typehinting is PHP Fatal error in PHP7+'); + } + try { Zend_Service_DeveloperGarden_SecurityTokenServer_Cache::setTokenToCache( 'NotExisting', @@ -176,6 +180,10 @@ public function testSetTokenToCache1stParamException() public function testSetTokenToCache2ndParamException() { + if (version_compare(phpversion(), '7', '>=')) { + $this->markTestSkipped('Invalid typehinting is PHP Fatal error in PHP7+'); + } + try { Zend_Service_DeveloperGarden_SecurityTokenServer_Cache::setTokenToCache( 'securityToken',