{"id":20028875,"url":"https://github.com/phase2/behat-drupal-extension","last_synced_at":"2025-07-04T15:39:24.129Z","repository":{"id":4393660,"uuid":"5530715","full_name":"phase2/behat-drupal-extension","owner":"phase2","description":"Drupal Extension for Behat","archived":false,"fork":false,"pushed_at":"2012-12-06T22:54:31.000Z","size":212,"stargazers_count":11,"open_issues_count":3,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-05-15T18:51:35.506Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phase2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-23T18:41:00.000Z","updated_at":"2024-11-20T13:13:14.000Z","dependencies_parsed_at":"2022-09-21T15:13:15.206Z","dependency_job_id":null,"html_url":"https://github.com/phase2/behat-drupal-extension","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/phase2/behat-drupal-extension","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fbehat-drupal-extension","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fbehat-drupal-extension/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fbehat-drupal-extension/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fbehat-drupal-extension/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phase2","download_url":"https://codeload.github.com/phase2/behat-drupal-extension/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phase2%2Fbehat-drupal-extension/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263568132,"owners_count":23481618,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T09:16:56.922Z","updated_at":"2025-07-04T15:39:24.093Z","avatar_url":"https://github.com/phase2.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"DrupalExtension\n---\n\nThis extension provides Behat integration with Drupal CMS projects.  It provides:\n\n* DrupalMinkContext, which provides some useful step definitions for common\n  Drupal functions, such as creating users and logging in.\n\nInstallation\n---\n\nThis extension requires:\n\n* [Behat 2.4+](http://behat.org/)\n* [MinkExtension](http://extensions.behat.org/mink/)\n\n### Through Composer\n\n1. Define dependencies in your composer.json:\n```javascript\n   {\n       \"require\": {\n           ...\n           \"phase2/drupal-extension\": \"dev-master\"\n       },\n       \"repositories\": [\n         ...\n         {\n           \"type\": \"vcs\",\n           \"url\": \"https://github.com/phase2/behat-drupal-extension\"\n         }\n       ]\n   }\n```\n\n2. Install/update your vendors\n```\n   $ curl http://getcomposer.org/installer | php\n   $ php composer.phar install\n```\n3. Activate extension in your behat.yml\n```yml\n   default:\n     # ...\n       extensions:\n         Phase2\\Behat\\DrupalExtension\\Extension:\n           drupal_root: /path/to/drupal\n           base_url: http://example.com/\n```\n\nUsage\n---\n\nAfter installing extension, there are 2 usage options available for you:\n\n1. Set the context class in the configuration file to use DrupalMinkContext.\n\n```yml\n   # behat.yml\n   default:\n     context:\n       class: Phase2\\Behat\\DrupalExtension\\Context\\DrupalMinkContext\n```\n\n   This will give you access to all of the pre-defined Drupal and Mink steps\n   without needing to create a FeatureContext of your own.\n\n2. Extend `Phase2\\Behat\\DrupalExtension\\Context\\DrupalMinkContext` with your context\n   or subcontext if you need additional step definitions or hooks.\n\nConfiguration\n---\n\nDrupalExtension comes with a flexible configuration system, that gives you the\nability to configure how Drupal is used.\n\n* `drupal_root` - specifies the path to your Drupal document root.\n* `base_url` - specify the URL to be used when bootstrapping Drupal.  If using\n  MinkExtension, this should match the base_url in the MinkExtension settings.\n* `module` - specify the name of an enabled Drupal module to run the feature\n  suite bundled with the module.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphase2%2Fbehat-drupal-extension","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphase2%2Fbehat-drupal-extension","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphase2%2Fbehat-drupal-extension/lists"}