Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Context arguments handling refactoring #446

Merged
merged 8 commits into from
Feb 3, 2014
Merged

Conversation

everzet
Copy link
Member

@everzet everzet commented Feb 2, 2014

  • Moved context class arguments setup back under the suite settings
  • Extracted context creation logic into ContextFactory
  • Added support for named context arguments

Basically, this PR adds full and equal support for next three setups:

default:
  suites:
    project:
      contexts:
        - VisitorContext
        - AdministratorContext
default:
  suites:
    cli:
      contexts:
        - CronContext:
            - 24
            - 13
            - 72
        - APIContext
default:
  suites:
    web:
      contexts:
        - VisitorContext
        - MinkContext:
            baseUrl: 'http://localhost'

Arguments will be passed to context classes separately (each value under the behat.yml context definition will become separate context argument). No more nonsense with array $parameters. Time to make our contexts POPO once again :)

@@ -59,6 +61,7 @@ Feature: Config inheritance
private $extension;

public function __construct(array $parameters) {
var_dump($parameters);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it be removed ?

@everzet
Copy link
Member Author

everzet commented Feb 2, 2014

@stof fixed. Thanks!

@everzet
Copy link
Member Author

everzet commented Feb 2, 2014

@stof what do you think about it? Mergeable?

stof added a commit that referenced this pull request Feb 3, 2014
@stof stof merged commit 6a4f23f into 3.0 Feb 3, 2014
@stof stof deleted the optimization/context-arguments branch February 3, 2014 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants