GithubHelp home page GithubHelp logo

Issue with DrupalExtension about drupal_ti HOT 8 CLOSED

lionsad avatar lionsad commented on June 14, 2024
Issue with DrupalExtension

from drupal_ti.

Comments (8)

Decipher avatar Decipher commented on June 14, 2024

Take into account that I have not used Behat until a few days ago, and Travis until a few hours ago, so no doubt it could be something clearly simple and stupid ;)

from drupal_ti.

LionsAd avatar LionsAd commented on June 14, 2024

Maybe you need the drupal driver instead of the drush driver?

I don't think calling functions like module_enable() directly works - maybe only as a side effect.

What probably works though for this case is:

drush = $this->getDrush();
drush->drush('pm-enable', array('module_name'));

from drupal_ti.

Decipher avatar Decipher commented on June 14, 2024

So, from what I can tell, Drupal is being bootstraped correctly in the Travis CI instance, where it is locally.

https://travis-ci.org/Decipher/test/jobs/73480577#L428 is the output of print_r($GLOBALS);, which is missing any evidence of a bootstraped Drupal install. Locally I get essentially the same results as I would running the command from within Drupal.

As such, at that particular point I can't run any native Drupal functions.

from drupal_ti.

LionsAd avatar LionsAd commented on June 14, 2024

@Decipher I am not sure you are supposed to be when using the drush driver:

https://github.com/Decipher/test/blob/master/tests/behat/behat.yml.dist#L16-L21

is missing something as far as I can tell:

https://github.com/panopoly/panopoly/pull/2/files#diff-63f34abbeedb18244e565e4c2b7eb2bcR12

I used drupal_root as well.

And I think without that, it can't find the drupal_root.

from drupal_ti.

Decipher avatar Decipher commented on June 14, 2024

Thanks, I think that was exactly what I needed. Appreciate the help.

from drupal_ti.

LionsAd avatar LionsAd commented on June 14, 2024

I am happy to accept a PR for adding that to the default behat.yml.dist file in drupal_ti for the test modules.

And also happy to accept a patch testing that by e.g. enabling drupal_ti_test via behat.

Or lets say it like that:

We probably should write a test, so if you don't I will probably do so in the future, opening an issue for that now.

from drupal_ti.

LionsAd avatar LionsAd commented on June 14, 2024

Opened: #32

from drupal_ti.

Decipher avatar Decipher commented on June 14, 2024

Sounds good. I would have, but I had already turned in for the night. Timezones.

from drupal_ti.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.