Allow to get groups from scenario #3675

Merged
merged 1 commit into from Nov 7, 2016

Conversation

Projects
None yet
3 participants
@frantzen
Contributor

frantzen commented Nov 2, 2016

Hi!
We use groups also to indicate that a test should, for instance, not being executed on firefox. So we do a:
* @group non_firefox

It would be great to have a getter for groups in the Scenario class.
Having that, we can do things like:

$groups = $scenario->getGroups();
if (in_array('non_firefox', $groups) and $scenario->current('browser') == 'firefox') { $scenario->skip(); }

Thanks for this great tool!
Lars

@DavertMik

This comment has been minimized.

Show comment
Hide comment
@DavertMik

DavertMik Nov 7, 2016

Member

Thanks! Looks helpful

Member

DavertMik commented Nov 7, 2016

Thanks! Looks helpful

@DavertMik DavertMik merged commit d67d308 into Codeception:2.2 Nov 7, 2016

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
semaphoreci The build passed on Semaphore.
Details

@frantzen frantzen deleted the frantzen:get-groups branch Nov 8, 2016

chris1312 added a commit to chris1312/Codeception that referenced this pull request Jun 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment