Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parse Error in SKIPIF not reported #5991

Open
staabm opened this issue Oct 14, 2024 · 0 comments
Open

Parse Error in SKIPIF not reported #5991

staabm opened this issue Oct 14, 2024 · 0 comments
Labels
feature/phpt End-to-end tests in PHPT format type/bug Something is broken

Comments

@staabm
Copy link
Contributor

staabm commented Oct 14, 2024

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 staabm added the type/bug Something is broken label Oct 14, 2024
@sebastianbergmann sebastianbergmann added the feature/phpt End-to-end tests in PHPT format label Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature/phpt End-to-end tests in PHPT format type/bug Something is broken
Projects
None yet
Development

No branches or pull requests

3 participants
@sebastianbergmann @staabm and others