Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

davy_yg's avatar
Level 27

Running PHP Unit in PHP Native

When trying to install and run php unit on php native I get the following error message:

E:\xampp75\htdocs\phpunit2\phpunit_12>phpunit tests___UsefulAssertionsTest PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in E:\xampp74\php\pear\PHPUnit\TextUI\Command.php on line 277

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in E:\xampp74\php\pear\PHPUnit\TextUI\Command.php on line 277 PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in E:\xampp74\php\pear\PHPUnit\TextUI\Command.php on line 285

Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in E:\xampp74\php\pear\PHPUnit\TextUI\Command.php on line 285 PHPUnit 3.7.21 by Sebastian Bergmann.

Cannot open file "tests\\UsefulAssertionsTest.php".

E:\xampp75\htdocs\phpunit2\phpunit_12>

ref: https://stackoverflow.com/questions/54184707/warning-continue-targeting-switch-is-equivalent-to-break-did-you-mean-to-u

my folder structure:

vendor [folder] composer.json composer.lock tests___UsefulAssertionsTest.php

I wonder why?

0 likes
1 reply
martinbean's avatar

@davy_yg Read the error message. It has nothing to do with PHPUnit; it sounds like you have code where you’re using continue within a switch statement when you should be using break instead.

Please or to participate in this conversation.