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

Can't load projects that use extensions #19

Open
eliza411 opened this issue Apr 1, 2013 · 2 comments
Open

Can't load projects that use extensions #19

eliza411 opened this issue Apr 1, 2013 · 2 comments
Assignees
Labels

Comments

@eliza411
Copy link

eliza411 commented Apr 1, 2013

I created a really brief Behat project to use as an example with ScenarioEd, and although it runs fine from command line, when I try to load it with ScenarioEd, I get:

Fatal error: Behat\Behat\Extension\ExtensionManager::initializeExtension(): Failed opening required 'Behat\MinkExtension\Extension' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/scenarioed/vendor/behat/behat/src/Behat/Behat/Extension/ExtensionManager.php on line 112

I'm not sure what all you need to know ... the behat.yml looks like:
default:
paths:
features: 'features'
extensions:
Behat\MinkExtension\Extension:
goutte: ~
selenium2: ~
base_url: http://scenarioed.org/
Drupal\DrupalExtension\Extension:
blackbox: ~

And the FeatureContext.php looks like:

use Behat\Behat\Context\ClosuredContextInterface,
    Behat\Behat\Context\TranslatedContextInterface,
    Behat\Behat\Context\BehatContext,
    Behat\Behat\Exception\PendingException;
use Behat\Gherkin\Node\PyStringNode,
    Behat\Gherkin\Node\TableNode;

/**
 * Features context.
 */
class FeatureContext extends Drupal\DrupalExtension\Context\DrupalContext
{
    /**
     * Initializes context.
     * Every scenario gets it's own context object.
     *
     * @param array $parameters context parameters (set them up through behat.yml)
     */
    public function __construct(array $parameters)
    {
        // Initialize your context here
    }
}
@ghost ghost assigned lotyrin Apr 1, 2013
@lotyrin
Copy link

lotyrin commented Apr 2, 2013

Because we're using a copy of Behat (within our own composer-based autoload env) to parse and load features, any projects that have configured Behat to load resources we don't have in our autoload environment will fail to load.

Looks like we should remove our dependency upon Behat, and use Gherkin a bit more directly.

@lotyrin
Copy link

lotyrin commented Apr 2, 2013

Short term solution for now would be to exclude any extension config parameters or feature contexts that try to autoload anything that ScenarioEd doesn't have.

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

No branches or pull requests

2 participants