Skip to content
This repository was archived by the owner on Oct 2, 2019. It is now read-only.

Commit cd3ad20

Browse files
committed
PHP typehinting can't be tested as it throws fatal error in PHP 7
1 parent 30291eb commit cd3ad20

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tests/Zend/Log/Writer/AbstractTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
*/
3838
class Zend_Log_Writer_AbstractTest extends PHPUnit_Framework_TestCase
3939
{
40+
/**
41+
* @var Zend_Log_Writer_Abstract
42+
*/
4043
protected $_writer;
4144

4245
public static function main()
@@ -55,6 +58,10 @@ protected function setUp()
5558
*/
5659
public function testSetFormatter()
5760
{
61+
if (version_compare(phpversion(), '7', '>=')) {
62+
$this->markTestSkipped('Invalid typehinting is PHP Fatal error in PHP7+');
63+
}
64+
5865
require_once 'Zend/Log/Formatter/Simple.php';
5966
$this->_writer->setFormatter(new Zend_Log_Formatter_Simple());
6067
$this->setExpectedException('PHPUnit_Framework_Error');

tests/Zend/Log/Writer/DbTest.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,10 @@ public function testFactory()
138138
*/
139139
public function testThrowStrictSetFormatter()
140140
{
141+
if (version_compare(phpversion(), '7', '>=')) {
142+
$this->markTestSkipped('Invalid typehinting is PHP Fatal error in PHP7+');
143+
}
144+
141145
try {
142146
$this->writer->setFormatter(new StdClass());
143147
} catch (Exception $e) {

0 commit comments

Comments
 (0)