phpunit icon indicating copy to clipboard operation
phpunit copied to clipboard

Parse Error in SKIPIF not reported

Open staabm opened this issue 1 year ago • 0 comments

Q A
PHPUnit version 10.5.36
PHP version 8.3.11
Installation Method Composer ~~/ PHAR~~

Summary

A PHPT test with a parse-error in the SKIPIF will be executed

--TEST--
PHPT runner reports parse errors in SKIPIF section
--SKIPIF--
<?php
if (rand(0,1)) // intentional PHP Parse error (missing opening curly brace)
}
--FILE--
<?php declare(strict_types=1);
echo 'hello world';
--EXPECTF--
hello world

Current behavior

the test succeeds without further notices

How to reproduce

run above PHPT test

Expected behavior

A error/warning should be printed that the SKIPIF contains a PHP Parse error

staabm avatar Oct 14 '24 14:10 staabm