natterbox/codeception-ctrlc

Allows safe abortion of a run by pressing `Ctrl+C`

2.0.0-RC1 2015-11-20 12:24 UTC

This package is not auto-updated.

Last update: 2024-11-09 19:17:34 UTC


README

Codeception module that allows safe abortion of a run by pressing Ctrl+C

This module will make sure that any cleanup that take place during a test tear-down will not be interrupted due to the user pressing Ctrl+C.

Installation

composer install "natterbox/codeception-ctrlc: ~1.0"

Usage

Enable the module in tests/<SuiteName>.suite.yml or codeception.yml.

...
modules:
    enabled:
        ...
        - Codeception\Extension\CtrlC
        ...
    config:
        ...
        Codeception\Extension\CtrlC:
            debug: true
        ...

Benefits of this module can be enjoyed just by adding it in the config.

For a demo, please do checkout the example. Run the demo test and press Ctrl+C.

IMPORTANT NOTE: The code shown in examples folder is just a demo and it is not the most common use-case for this module.