First of all, remember which commands are available to you, will depend on which modules and kits you have downloaded. For example, if you are performing integration tests with WordPress YML enabled by default:
$scenario->skip('your message');
will not work in Cest or Test out of the box, but will work in Acceptance.
In fact, as a rule, this command will work with Cept tests. [Cepts, usually such as tests, tests, and tests are usually PHPUnit, such as OOP tests]. In addition, you need to pass $ script to your function. This is clearly not documented, and I cannot get it to work in Cests. Donβt make me start by just how bad the "script $" choice is for the keyword for the BDD framework! "Script" is a keyword in Gherkin that refers to what is a "step object" in Codeception. In Codeception, it seems to be used as a redundant form of "environment", although there are already environments, suites and groups. Like most of these great frameworks, the names of documents and functions need to be redone by native English speakers for the second time! [remember "web guy"? Damn sexist Europeans! Lol].
If you use
public function myTest(){
Annotations directly above your function in Cest or Test will be skipped and will not even appear in the report. [REALLY skip]. Use this if you want to completely hide the test.
If you use the PHPUnit command directly:
public function myTest(){ throw new \PHPUnit_Framework_SkippedTestError('This test is skipped');
This will result in a missed test in the report, turn yellow in the HTML report [--html]. Use this if you want to skip the test, but pay attention to the report that he missed.
Jim maguire
source share