Skip to content

Parse Error in SKIPIF not reported #5991

Open
@staabm

Description

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature/phptEnd-to-end tests in PHPT formattype/bugSomething is broken

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions