Skip to content
This repository has been archived by the owner on Mar 20, 2024. It is now read-only.

create/extend driver factory class #314

Open
t14 opened this issue Dec 18, 2017 · 1 comment
Open

create/extend driver factory class #314

t14 opened this issue Dec 18, 2017 · 1 comment

Comments

@t14
Copy link

t14 commented Dec 18, 2017

Is it possible to create your own driver factory or extend an existing one?

e.g would like to extend an existing factory class in my custom code src/Behat/MinkEztension/ServiceContainer/Driver/.....

Thank you

@spolischook
Copy link

In your extension you can register factory:

    /**
     * {@inheritdoc}
     */
    public function initialize(ExtensionManager $extensionManager)
    {
        /** @var MinkExtension $minkExtension */
        $minkExtension = $extensionManager->getExtension('mink');
        $minkExtension->registerDriverFactory(new MyOwnFactory());
    }

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

No branches or pull requests

2 participants