{"action":"created","comment":{"url":"https://api.github.com/repos/jhedstrom/DrupalDriver/pulls/comments/43053712","id":43053712,"diff_hunk":"@@ -19,7 +19,8 @@\n     \"drupal/coder\": \"~8.2.0\",\n     \"phpspec/phpspec\": \"~2.0\",\n     \"phpunit/phpunit\": \"~4.0\",\n-    \"mockery/mockery\": \"0.9.4\"\n+    \"mockery/mockery\": \"0.9.4\",\n+    \"drush-ops/behat-drush-endpoint\": \"*\"","path":"composer.json","position":6,"original_position":6,"commit_id":"b6553d6d55213150fdd5ad60dc80732a0fe061d7","original_commit_id":"b6553d6d55213150fdd5ad60dc80732a0fe061d7","user":{"login":"greg-1-anderson","id":612191,"avatar_url":"https://avatars.githubusercontent.com/u/612191?v=3","gravatar_id":"","url":"https://api.github.com/users/greg-1-anderson","html_url":"https://github.com/greg-1-anderson","followers_url":"https://api.github.com/users/greg-1-anderson/followers","following_url":"https://api.github.com/users/greg-1-anderson/following{/other_user}","gists_url":"https://api.github.com/users/greg-1-anderson/gists{/gist_id}","starred_url":"https://api.github.com/users/greg-1-anderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greg-1-anderson/subscriptions","organizations_url":"https://api.github.com/users/greg-1-anderson/orgs","repos_url":"https://api.github.com/users/greg-1-anderson/repos","events_url":"https://api.github.com/users/greg-1-anderson/events{/privacy}","received_events_url":"https://api.github.com/users/greg-1-anderson/received_events","type":"User","site_admin":false},"body":"We could remove it; the advantage of removing it is that not all users need it.  The advantage of including it here is that the separate installation instructions do not need to be followed if the user is managing their site with Composer -- the Drush Driver will just start working as of the next `composer update`.  The separate installation instructions will need to be followed by users who are not managing their Drupal sites with Composer, though.\r\n\r\nIt's a small extension; I'd recommend keeping it in the dependencies here.  It's completely up to you, though.","created_at":"2015-10-26T21:11:54Z","updated_at":"2015-10-26T21:11:54Z","html_url":"https://github.com/jhedstrom/DrupalDriver/pull/56#discussion_r43053712","pull_request_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/pulls/56","_links":{"self":{"href":"https://api.github.com/repos/jhedstrom/DrupalDriver/pulls/comments/43053712"},"html":{"href":"https://github.com/jhedstrom/DrupalDriver/pull/56#discussion_r43053712"},"pull_request":{"href":"https://api.github.com/repos/jhedstrom/DrupalDriver/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/jhedstrom/DrupalDriver/pulls/56","id":43934351,"html_url":"https://github.com/jhedstrom/DrupalDriver/pull/56","diff_url":"https://github.com/jhedstrom/DrupalDriver/pull/56.diff","patch_url":"https://github.com/jhedstrom/DrupalDriver/pull/56.patch","issue_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/issues/56","number":56,"state":"open","locked":false,"title":"Enhance the Drush driver to allow creation of nodes and taxonomy terms.","user":{"login":"greg-1-anderson","id":612191,"avatar_url":"https://avatars.githubusercontent.com/u/612191?v=3","gravatar_id":"","url":"https://api.github.com/users/greg-1-anderson","html_url":"https://github.com/greg-1-anderson","followers_url":"https://api.github.com/users/greg-1-anderson/followers","following_url":"https://api.github.com/users/greg-1-anderson/following{/other_user}","gists_url":"https://api.github.com/users/greg-1-anderson/gists{/gist_id}","starred_url":"https://api.github.com/users/greg-1-anderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greg-1-anderson/subscriptions","organizations_url":"https://api.github.com/users/greg-1-anderson/orgs","repos_url":"https://api.github.com/users/greg-1-anderson/repos","events_url":"https://api.github.com/users/greg-1-anderson/events{/privacy}","received_events_url":"https://api.github.com/users/greg-1-anderson/received_events","type":"User","site_admin":false},"body":"This is still a prototype, submitted with the goal of collecting feedback on the concept and direction. It is super useful to be able to create nodes and taxonomy terms with the Drush Driver, e.g. when writing Behat tests on Circle or Travis, and testing on a remote Drupal site.\r\n\r\nThis PR adds additional 'drush' calls to the Drush driver to allow for the creation of nodes and taxonomy terms.  These capabilities are not provided by default in Drush core; therefore, to make this work, a new Drush commandfile, behat.d7.drush.inc, must be installed in the target Drupal site.  This commandfile handles all node and term create and delete requests.\r\n\r\nThe current implementation of behat.d7.drush.inc uses some classed from the DrupalDriver.  This only works if you have set up your Drupal site such that it is managed by Composer, and both Drush and Behat (and, of course, the Behat DrupalDriver) are required from your composer.json.  If you do this, then Drush will load the autoload file that contains the Behat DrupalDriver classes.  Other parts of the code are copied in, rather than used directly.  I think that it would be necessary to set up a Symfony container in order to use the other classes here, although clearly I did not try this.  drush-ops/drush#1377 would be useful here, though.\r\n\r\nThere is also a behat.d8.drush.inc file that is mentioned in this PR, but not provided; this still needs to be implemented.\r\n\r\nYou will also notice that there is minimal (no) error checking inside the new methods in the Drush driver.  Currently, if the behat Drush extension is not loaded in the target site, this causes an exception to be thrown, which is already reported.  It would probably be possible to catch this exception, and replace the reported error message with advice / instructions on how to install the Behat Drush extension.","created_at":"2015-09-01T22:27:06Z","updated_at":"2015-10-26T21:11:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b13912c7f754c09b6b1693da121b7efcb784d2a8","assignee":null,"milestone":{"url":"https://api.github.com/repos/jhedstrom/DrupalDriver/milestones/2","html_url":"https://github.com/jhedstrom/DrupalDriver/milestones/1.2.0%20release","labels_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/milestones/2/labels","id":1287351,"number":2,"title":"1.2.0 release","description":"","creator":{"login":"jhedstrom","id":76833,"avatar_url":"https://avatars.githubusercontent.com/u/76833?v=3","gravatar_id":"","url":"https://api.github.com/users/jhedstrom","html_url":"https://github.com/jhedstrom","followers_url":"https://api.github.com/users/jhedstrom/followers","following_url":"https://api.github.com/users/jhedstrom/following{/other_user}","gists_url":"https://api.github.com/users/jhedstrom/gists{/gist_id}","starred_url":"https://api.github.com/users/jhedstrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhedstrom/subscriptions","organizations_url":"https://api.github.com/users/jhedstrom/orgs","repos_url":"https://api.github.com/users/jhedstrom/repos","events_url":"https://api.github.com/users/jhedstrom/events{/privacy}","received_events_url":"https://api.github.com/users/jhedstrom/received_events","type":"User","site_admin":false},"open_issues":2,"closed_issues":2,"state":"open","created_at":"2015-09-02T22:30:06Z","updated_at":"2015-10-08T16:43:12Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/pulls/56/commits","review_comments_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/pulls/56/comments","review_comment_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/pulls/comments{/number}","comments_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/issues/56/comments","statuses_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/statuses/b6553d6d55213150fdd5ad60dc80732a0fe061d7","head":{"label":"greg-1-anderson:drush-create-node","ref":"drush-create-node","sha":"b6553d6d55213150fdd5ad60dc80732a0fe061d7","user":{"login":"greg-1-anderson","id":612191,"avatar_url":"https://avatars.githubusercontent.com/u/612191?v=3","gravatar_id":"","url":"https://api.github.com/users/greg-1-anderson","html_url":"https://github.com/greg-1-anderson","followers_url":"https://api.github.com/users/greg-1-anderson/followers","following_url":"https://api.github.com/users/greg-1-anderson/following{/other_user}","gists_url":"https://api.github.com/users/greg-1-anderson/gists{/gist_id}","starred_url":"https://api.github.com/users/greg-1-anderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greg-1-anderson/subscriptions","organizations_url":"https://api.github.com/users/greg-1-anderson/orgs","repos_url":"https://api.github.com/users/greg-1-anderson/repos","events_url":"https://api.github.com/users/greg-1-anderson/events{/privacy}","received_events_url":"https://api.github.com/users/greg-1-anderson/received_events","type":"User","site_admin":false},"repo":{"id":41765273,"name":"DrupalDriver","full_name":"greg-1-anderson/DrupalDriver","owner":{"login":"greg-1-anderson","id":612191,"avatar_url":"https://avatars.githubusercontent.com/u/612191?v=3","gravatar_id":"","url":"https://api.github.com/users/greg-1-anderson","html_url":"https://github.com/greg-1-anderson","followers_url":"https://api.github.com/users/greg-1-anderson/followers","following_url":"https://api.github.com/users/greg-1-anderson/following{/other_user}","gists_url":"https://api.github.com/users/greg-1-anderson/gists{/gist_id}","starred_url":"https://api.github.com/users/greg-1-anderson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greg-1-anderson/subscriptions","organizations_url":"https://api.github.com/users/greg-1-anderson/orgs","repos_url":"https://api.github.com/users/greg-1-anderson/repos","events_url":"https://api.github.com/users/greg-1-anderson/events{/privacy}","received_events_url":"https://api.github.com/users/greg-1-anderson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/greg-1-anderson/DrupalDriver","description":"A collection of drivers for controlling Drupal.","fork":true,"url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver","forks_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/forks","keys_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/teams","hooks_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/hooks","issue_events_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/issues/events{/number}","events_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/events","assignees_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/assignees{/user}","branches_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/branches{/branch}","tags_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/tags","blobs_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/statuses/{sha}","languages_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/languages","stargazers_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/stargazers","contributors_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/contributors","subscribers_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/subscribers","subscription_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/subscription","commits_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/contents/{+path}","compare_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/merges","archive_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/downloads","issues_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/issues{/number}","pulls_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/pulls{/number}","milestones_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/milestones{/number}","notifications_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/labels{/name}","releases_url":"https://api.github.com/repos/greg-1-anderson/DrupalDriver/releases{/id}","created_at":"2015-09-01T21:50:15Z","updated_at":"2015-09-01T21:50:16Z","pushed_at":"2015-10-24T21:00:47Z","git_url":"git://github.com/greg-1-anderson/DrupalDriver.git","ssh_url":"git@github.com:greg-1-anderson/DrupalDriver.git","clone_url":"https://github.com/greg-1-anderson/DrupalDriver.git","svn_url":"https://github.com/greg-1-anderson/DrupalDriver","homepage":null,"size":537,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"jhedstrom:master","ref":"master","sha":"f6e240435234938ac8e92c2cbc993ff79150be11","user":{"login":"jhedstrom","id":76833,"avatar_url":"https://avatars.githubusercontent.com/u/76833?v=3","gravatar_id":"","url":"https://api.github.com/users/jhedstrom","html_url":"https://github.com/jhedstrom","followers_url":"https://api.github.com/users/jhedstrom/followers","following_url":"https://api.github.com/users/jhedstrom/following{/other_user}","gists_url":"https://api.github.com/users/jhedstrom/gists{/gist_id}","starred_url":"https://api.github.com/users/jhedstrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhedstrom/subscriptions","organizations_url":"https://api.github.com/users/jhedstrom/orgs","repos_url":"https://api.github.com/users/jhedstrom/repos","events_url":"https://api.github.com/users/jhedstrom/events{/privacy}","received_events_url":"https://api.github.com/users/jhedstrom/received_events","type":"User","site_admin":false},"repo":{"id":24713594,"name":"DrupalDriver","full_name":"jhedstrom/DrupalDriver","owner":{"login":"jhedstrom","id":76833,"avatar_url":"https://avatars.githubusercontent.com/u/76833?v=3","gravatar_id":"","url":"https://api.github.com/users/jhedstrom","html_url":"https://github.com/jhedstrom","followers_url":"https://api.github.com/users/jhedstrom/followers","following_url":"https://api.github.com/users/jhedstrom/following{/other_user}","gists_url":"https://api.github.com/users/jhedstrom/gists{/gist_id}","starred_url":"https://api.github.com/users/jhedstrom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jhedstrom/subscriptions","organizations_url":"https://api.github.com/users/jhedstrom/orgs","repos_url":"https://api.github.com/users/jhedstrom/repos","events_url":"https://api.github.com/users/jhedstrom/events{/privacy}","received_events_url":"https://api.github.com/users/jhedstrom/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jhedstrom/DrupalDriver","description":"A collection of drivers for controlling Drupal.","fork":false,"url":"https://api.github.com/repos/jhedstrom/DrupalDriver","forks_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/forks","keys_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/teams","hooks_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/hooks","issue_events_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/issues/events{/number}","events_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/events","assignees_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/assignees{/user}","branches_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/branches{/branch}","tags_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/tags","blobs_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/git/refs{/sha}","trees_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/statuses/{sha}","languages_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/languages","stargazers_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/stargazers","contributors_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/contributors","subscribers_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/subscribers","subscription_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/subscription","commits_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/commits{/sha}","git_commits_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/git/commits{/sha}","comments_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/comments{/number}","issue_comment_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/issues/comments{/number}","contents_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/contents/{+path}","compare_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/merges","archive_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/downloads","issues_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/issues{/number}","pulls_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/pulls{/number}","milestones_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/milestones{/number}","notifications_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/labels{/name}","releases_url":"https://api.github.com/repos/jhedstrom/DrupalDriver/releases{/id}","created_at":"2014-10-02T09:29:18Z","updated_at":"2015-09-23T19:26:05Z","pushed_at":"2015-10-24T21:00:48Z","git_url":"git://github.com/jhedstrom/DrupalDriver.git","ssh_url":"git@github.com:jhedstrom/DrupalDriver.git","clone_url":"https://github.com/jhedstrom/DrupalDriver.git","svn_url":"https://github.com/jhedstrom/DrupalDriver","homepage":null,"size":1249,"stargazers_count":10,"watchers_count":10,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":25,"mirror_url":null,"open_issues_count":6,"forks":25,"open_issues":6,"watchers":10,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jhedstrom/DrupalDriver/pulls/56"},"html":{"href":"https://github.com/jhedstrom/DrupalDriver/pull/56"},"issue":{"href":"https://api.github.com/repos/jhedstrom/DrupalDriver/issues/56"},"comments":{"href":"https://api.github.com/repos/jhedstrom/DrupalDriver/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/jhedstrom/DrupalDriver/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/jhedstrom/DrupalDriver/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/jhedstrom/DrupalDriver/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/jhedstrom/DrupalDriver/statuses/b6553d6d55213150fdd5ad60dc80732a0fe061d7"}}}}