Skip to content
This repository has been archived by the owner on Jul 3, 2023. It is now read-only.

2.0 - Support for handling invalid parameters (#23) #26

Merged
merged 19 commits into from
Feb 9, 2020
Merged

Conversation

edno
Copy link
Owner

@edno edno commented Feb 4, 2020

Update behaviour for handling invalid parameter case.

3 behaviours supported using module configuration:

  1. default: if parameter/variable does not exist then it is not replaced (see discussion inconsistent variable or key not found  #23), ie {{not_valid}} will be {{not_valid}} at runtime
  2. nullable: when onErrorNullable is true then invalid parameter/variable are replaced by null, ie {{not_valid}} will be null at runtime
  3. exception: when onErrorThrowException is true then invalid parameter/variable throws a GherkinParamException at runtime

⚠️ This change requires to transform GherkinParam into a module. This is a breaking change for existing setup).

modules:
    enabled:
        - Codeception\Extension\GherkinParam
            onErrorNullable: false|true
            onErrorThrowException: false|true

Merging this PR will trigger version 2.0

@coveralls
Copy link

Coverage Status

Coverage decreased (-7.3%) to 92.683% when pulling 01eb72c on error-cases into 0720975 on master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-7.3%) to 92.683% when pulling 01eb72c on error-cases into 0720975 on master.

@coveralls
Copy link

coveralls commented Feb 4, 2020

Coverage Status

Coverage decreased (-11.5%) to 88.506% when pulling 6df3b55 on error-cases into 0720975 on master.

@edno edno added this to the 2.0 milestone Feb 4, 2020
@edno edno changed the title Support for handling invalid parameters (#23) 2.0 - Support for handling invalid parameters (#23) Feb 6, 2020
@edno edno merged commit 9eebc34 into master Feb 9, 2020
@edno edno deleted the error-cases branch February 9, 2020 16:45
@gimler
Copy link
Contributor

gimler commented Feb 11, 2020

Works as expected good work

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants