Skip to content

Commit f07a7b9

Browse files
committed
fixing error in tests for php 7
1 parent a76ffdd commit f07a7b9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tests/Errors/Exceptions/TestErrorHandler.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,13 @@ public function systemExceptionsProvider(){
129129
$parseErrorFile = tempnam(sys_get_temp_dir(), "PAR");
130130
file_put_contents($parseErrorFile, "<?php \n noSemicolon()");
131131

132+
$errorUpdateforPHP7 = '[S][E_ERROR] Call to undefined function undefinedFunction() : PhpPlatform\Errors\Exceptions\System\SystemError';
133+
if(strpos(phpversion(), "7.") === 0){
134+
$errorUpdateforPHP7 = 'Call to undefined function undefinedFunction()';
135+
}
136+
132137
return array(
133-
array('undefinedFunction();','[S][E_ERROR] Call to undefined function undefinedFunction() : PhpPlatform\Errors\Exceptions\System\SystemError',''),
138+
array('undefinedFunction();',$errorUpdateforPHP7,''),
134139
array("include_once '$parseErrorFile';",'[S][E_PARSE] syntax error, unexpected end of file : PhpPlatform\Errors\Exceptions\System\SystemError','')
135140
);
136141
}

0 commit comments

Comments
 (0)