{"action":"created","comment":{"url":"https://api.github.com/repos/ec-europa/platform-dev/pulls/comments/75807675","id":75807675,"diff_hunk":"@@ -0,0 +1,93 @@\n+<?php\n+\n+/**\n+ * @file\n+ * Contains \\MultisiteMaxlengthSubContext.\n+ */\n+\n+use Drupal\\DrupalDriverManager;\n+use Drupal\\DrupalExtension\\Context\\DrupalSubContextInterface;\n+use Drupal\\DrupalExtension\\Context\\RawDrupalContext;\n+\n+/**\n+ * Behat step definitions for the Multisite Maxlength module.\n+ */\n+class MultisiteMaxlengthSubContext extends RawDrupalContext implements DrupalSubContextInterface {\n+\n+  /**\n+   * {@inheritdoc}\n+   */\n+  protected $drupal;\n+\n+  /**\n+   * List of Fields created during test execution.\n+   *\n+   * @var \\TMGMTJob[]\n+   */\n+  protected $fields = [];\n+\n+  /**\n+   * Constructs a MultisiteMaxlengthSubContext object.\n+   *\n+   * @param DrupalDriverManager $drupal\n+   *   The Drupal driver manager.\n+   */\n+  public function __construct(DrupalDriverManager $drupal) {\n+    $this->drupal = $drupal;\n+  }\n+\n+  /**\n+   * Create a field in the .\n+   *\n+   * @param string $field_name\n+   *    Machine name of the field.\n+   * @param string $field_type\n+   *    Type of the field.\n+   * @param string $field_bundle\n+   *    Bundle of type.\n+   *\n+   * @Then I create a new :field_type field named :field_name on :field_bundle\n+   */\n+  public function iCreateNewFieldNamedOn($field_name, $field_type, $field_bundle) {\n+    // Make sure the field doesn't already exist.\n+    if (!field_info_field($field_name)) {\n+      // Create the field.\n+      $field = array(\n+        'field_name' => $field_name,\n+        'type' => $field_type,\n+        'settings' => array('max_length' => 64),\n+      );\n+      field_create_field($field);\n+\n+      // Create the instance.\n+      $instance = array(\n+        'field_name' => $field_name,\n+        'entity_type' => 'node',\n+        'bundle' => $field_bundle,\n+        'label' => $field_name,\n+        'description' => '',\n+        'required' => FALSE,\n+      );\n+      field_create_instance($instance);\n+\n+      // Backup fields created.\n+      $this->fields[] = $field;\n+    }\n+    else {\n+      throw new \\InvalidArgumentException(\"The field '{$field_name}' is already existing.\");\n+    }\n+  }\n+\n+  /**\n+   * Revert to previous settings after scenario execution.\n+   *\n+   * @AfterScenario\n+   */\n+  public function removeFields() {\n+    // Remove the fields.\n+    foreach ($this->fields as $field) {\n+      field_delete_field($field['field_name']);","path":"profiles/common/modules/features/multisite_maxlength/src/multisite_maxlength.behat.inc","position":89,"original_position":89,"commit_id":"53de74c97929022eaba46df890eb23a442fc5275","original_commit_id":"53de74c97929022eaba46df890eb23a442fc5275","user":{"login":"cyberwolf","id":95102,"avatar_url":"https://avatars.githubusercontent.com/u/95102?v=3","gravatar_id":"","url":"https://api.github.com/users/cyberwolf","html_url":"https://github.com/cyberwolf","followers_url":"https://api.github.com/users/cyberwolf/followers","following_url":"https://api.github.com/users/cyberwolf/following{/other_user}","gists_url":"https://api.github.com/users/cyberwolf/gists{/gist_id}","starred_url":"https://api.github.com/users/cyberwolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyberwolf/subscriptions","organizations_url":"https://api.github.com/users/cyberwolf/orgs","repos_url":"https://api.github.com/users/cyberwolf/repos","events_url":"https://api.github.com/users/cyberwolf/events{/privacy}","received_events_url":"https://api.github.com/users/cyberwolf/received_events","type":"User","site_admin":false},"body":"I suggest to add a field_purge_batch() call as well, to really delete the field. Otherwise it stays around until the next cron run.","created_at":"2016-08-23T06:15:33Z","updated_at":"2016-08-23T06:15:33Z","html_url":"https://github.com/ec-europa/platform-dev/pull/827#discussion_r75807675","pull_request_url":"https://api.github.com/repos/ec-europa/platform-dev/pulls/827","_links":{"self":{"href":"https://api.github.com/repos/ec-europa/platform-dev/pulls/comments/75807675"},"html":{"href":"https://github.com/ec-europa/platform-dev/pull/827#discussion_r75807675"},"pull_request":{"href":"https://api.github.com/repos/ec-europa/platform-dev/pulls/827"}}},"pull_request":{"url":"https://api.github.com/repos/ec-europa/platform-dev/pulls/827","id":81809051,"html_url":"https://github.com/ec-europa/platform-dev/pull/827","diff_url":"https://github.com/ec-europa/platform-dev/pull/827.diff","patch_url":"https://github.com/ec-europa/platform-dev/pull/827.patch","issue_url":"https://api.github.com/repos/ec-europa/platform-dev/issues/827","number":827,"state":"open","locked":false,"title":"Hotfix/nexteuropa 12724","user":{"login":"voidtek","id":186827,"avatar_url":"https://avatars.githubusercontent.com/u/186827?v=3","gravatar_id":"","url":"https://api.github.com/users/voidtek","html_url":"https://github.com/voidtek","followers_url":"https://api.github.com/users/voidtek/followers","following_url":"https://api.github.com/users/voidtek/following{/other_user}","gists_url":"https://api.github.com/users/voidtek/gists{/gist_id}","starred_url":"https://api.github.com/users/voidtek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/voidtek/subscriptions","organizations_url":"https://api.github.com/users/voidtek/orgs","repos_url":"https://api.github.com/users/voidtek/repos","events_url":"https://api.github.com/users/voidtek/events{/privacy}","received_events_url":"https://api.github.com/users/voidtek/received_events","type":"User","site_admin":false},"body":"https://webgate.ec.europa.eu/CITnet/jira/browse/NEXTEUROPA-12724","created_at":"2016-08-18T12:43:58Z","updated_at":"2016-08-23T06:15:33Z","closed_at":null,"merged_at":null,"merge_commit_sha":"32cbfd9272f86102a3a870d887f75e41b56d689b","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ec-europa/platform-dev/pulls/827/commits","review_comments_url":"https://api.github.com/repos/ec-europa/platform-dev/pulls/827/comments","review_comment_url":"https://api.github.com/repos/ec-europa/platform-dev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ec-europa/platform-dev/issues/827/comments","statuses_url":"https://api.github.com/repos/ec-europa/platform-dev/statuses/53de74c97929022eaba46df890eb23a442fc5275","head":{"label":"ec-europa:HOTFIX/NEXTEUROPA-12724","ref":"HOTFIX/NEXTEUROPA-12724","sha":"53de74c97929022eaba46df890eb23a442fc5275","user":{"login":"ec-europa","id":10885565,"avatar_url":"https://avatars.githubusercontent.com/u/10885565?v=3","gravatar_id":"","url":"https://api.github.com/users/ec-europa","html_url":"https://github.com/ec-europa","followers_url":"https://api.github.com/users/ec-europa/followers","following_url":"https://api.github.com/users/ec-europa/following{/other_user}","gists_url":"https://api.github.com/users/ec-europa/gists{/gist_id}","starred_url":"https://api.github.com/users/ec-europa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ec-europa/subscriptions","organizations_url":"https://api.github.com/users/ec-europa/orgs","repos_url":"https://api.github.com/users/ec-europa/repos","events_url":"https://api.github.com/users/ec-europa/events{/privacy}","received_events_url":"https://api.github.com/users/ec-europa/received_events","type":"Organization","site_admin":false},"repo":{"id":41666809,"name":"platform-dev","full_name":"ec-europa/platform-dev","owner":{"login":"ec-europa","id":10885565,"avatar_url":"https://avatars.githubusercontent.com/u/10885565?v=3","gravatar_id":"","url":"https://api.github.com/users/ec-europa","html_url":"https://github.com/ec-europa","followers_url":"https://api.github.com/users/ec-europa/followers","following_url":"https://api.github.com/users/ec-europa/following{/other_user}","gists_url":"https://api.github.com/users/ec-europa/gists{/gist_id}","starred_url":"https://api.github.com/users/ec-europa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ec-europa/subscriptions","organizations_url":"https://api.github.com/users/ec-europa/orgs","repos_url":"https://api.github.com/users/ec-europa/repos","events_url":"https://api.github.com/users/ec-europa/events{/privacy}","received_events_url":"https://api.github.com/users/ec-europa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ec-europa/platform-dev","description":"NextEuropa platform","fork":false,"url":"https://api.github.com/repos/ec-europa/platform-dev","forks_url":"https://api.github.com/repos/ec-europa/platform-dev/forks","keys_url":"https://api.github.com/repos/ec-europa/platform-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ec-europa/platform-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ec-europa/platform-dev/teams","hooks_url":"https://api.github.com/repos/ec-europa/platform-dev/hooks","issue_events_url":"https://api.github.com/repos/ec-europa/platform-dev/issues/events{/number}","events_url":"https://api.github.com/repos/ec-europa/platform-dev/events","assignees_url":"https://api.github.com/repos/ec-europa/platform-dev/assignees{/user}","branches_url":"https://api.github.com/repos/ec-europa/platform-dev/branches{/branch}","tags_url":"https://api.github.com/repos/ec-europa/platform-dev/tags","blobs_url":"https://api.github.com/repos/ec-europa/platform-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ec-europa/platform-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ec-europa/platform-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/ec-europa/platform-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ec-europa/platform-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/ec-europa/platform-dev/languages","stargazers_url":"https://api.github.com/repos/ec-europa/platform-dev/stargazers","contributors_url":"https://api.github.com/repos/ec-europa/platform-dev/contributors","subscribers_url":"https://api.github.com/repos/ec-europa/platform-dev/subscribers","subscription_url":"https://api.github.com/repos/ec-europa/platform-dev/subscription","commits_url":"https://api.github.com/repos/ec-europa/platform-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/ec-europa/platform-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/ec-europa/platform-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/ec-europa/platform-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/ec-europa/platform-dev/contents/{+path}","compare_url":"https://api.github.com/repos/ec-europa/platform-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ec-europa/platform-dev/merges","archive_url":"https://api.github.com/repos/ec-europa/platform-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ec-europa/platform-dev/downloads","issues_url":"https://api.github.com/repos/ec-europa/platform-dev/issues{/number}","pulls_url":"https://api.github.com/repos/ec-europa/platform-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/ec-europa/platform-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/ec-europa/platform-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ec-europa/platform-dev/labels{/name}","releases_url":"https://api.github.com/repos/ec-europa/platform-dev/releases{/id}","deployments_url":"https://api.github.com/repos/ec-europa/platform-dev/deployments","created_at":"2015-08-31T09:16:12Z","updated_at":"2016-08-20T16:59:21Z","pushed_at":"2016-08-22T16:58:52Z","git_url":"git://github.com/ec-europa/platform-dev.git","ssh_url":"git@github.com:ec-europa/platform-dev.git","clone_url":"https://github.com/ec-europa/platform-dev.git","svn_url":"https://github.com/ec-europa/platform-dev","homepage":null,"size":54243,"stargazers_count":23,"watchers_count":23,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":38,"forks":18,"open_issues":38,"watchers":23,"default_branch":"master"}},"base":{"label":"ec-europa:2.1-support","ref":"2.1-support","sha":"84178805a86525510eb842b1bf38756518908bc8","user":{"login":"ec-europa","id":10885565,"avatar_url":"https://avatars.githubusercontent.com/u/10885565?v=3","gravatar_id":"","url":"https://api.github.com/users/ec-europa","html_url":"https://github.com/ec-europa","followers_url":"https://api.github.com/users/ec-europa/followers","following_url":"https://api.github.com/users/ec-europa/following{/other_user}","gists_url":"https://api.github.com/users/ec-europa/gists{/gist_id}","starred_url":"https://api.github.com/users/ec-europa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ec-europa/subscriptions","organizations_url":"https://api.github.com/users/ec-europa/orgs","repos_url":"https://api.github.com/users/ec-europa/repos","events_url":"https://api.github.com/users/ec-europa/events{/privacy}","received_events_url":"https://api.github.com/users/ec-europa/received_events","type":"Organization","site_admin":false},"repo":{"id":41666809,"name":"platform-dev","full_name":"ec-europa/platform-dev","owner":{"login":"ec-europa","id":10885565,"avatar_url":"https://avatars.githubusercontent.com/u/10885565?v=3","gravatar_id":"","url":"https://api.github.com/users/ec-europa","html_url":"https://github.com/ec-europa","followers_url":"https://api.github.com/users/ec-europa/followers","following_url":"https://api.github.com/users/ec-europa/following{/other_user}","gists_url":"https://api.github.com/users/ec-europa/gists{/gist_id}","starred_url":"https://api.github.com/users/ec-europa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ec-europa/subscriptions","organizations_url":"https://api.github.com/users/ec-europa/orgs","repos_url":"https://api.github.com/users/ec-europa/repos","events_url":"https://api.github.com/users/ec-europa/events{/privacy}","received_events_url":"https://api.github.com/users/ec-europa/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ec-europa/platform-dev","description":"NextEuropa platform","fork":false,"url":"https://api.github.com/repos/ec-europa/platform-dev","forks_url":"https://api.github.com/repos/ec-europa/platform-dev/forks","keys_url":"https://api.github.com/repos/ec-europa/platform-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ec-europa/platform-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ec-europa/platform-dev/teams","hooks_url":"https://api.github.com/repos/ec-europa/platform-dev/hooks","issue_events_url":"https://api.github.com/repos/ec-europa/platform-dev/issues/events{/number}","events_url":"https://api.github.com/repos/ec-europa/platform-dev/events","assignees_url":"https://api.github.com/repos/ec-europa/platform-dev/assignees{/user}","branches_url":"https://api.github.com/repos/ec-europa/platform-dev/branches{/branch}","tags_url":"https://api.github.com/repos/ec-europa/platform-dev/tags","blobs_url":"https://api.github.com/repos/ec-europa/platform-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ec-europa/platform-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ec-europa/platform-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/ec-europa/platform-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ec-europa/platform-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/ec-europa/platform-dev/languages","stargazers_url":"https://api.github.com/repos/ec-europa/platform-dev/stargazers","contributors_url":"https://api.github.com/repos/ec-europa/platform-dev/contributors","subscribers_url":"https://api.github.com/repos/ec-europa/platform-dev/subscribers","subscription_url":"https://api.github.com/repos/ec-europa/platform-dev/subscription","commits_url":"https://api.github.com/repos/ec-europa/platform-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/ec-europa/platform-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/ec-europa/platform-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/ec-europa/platform-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/ec-europa/platform-dev/contents/{+path}","compare_url":"https://api.github.com/repos/ec-europa/platform-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ec-europa/platform-dev/merges","archive_url":"https://api.github.com/repos/ec-europa/platform-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ec-europa/platform-dev/downloads","issues_url":"https://api.github.com/repos/ec-europa/platform-dev/issues{/number}","pulls_url":"https://api.github.com/repos/ec-europa/platform-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/ec-europa/platform-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/ec-europa/platform-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ec-europa/platform-dev/labels{/name}","releases_url":"https://api.github.com/repos/ec-europa/platform-dev/releases{/id}","deployments_url":"https://api.github.com/repos/ec-europa/platform-dev/deployments","created_at":"2015-08-31T09:16:12Z","updated_at":"2016-08-20T16:59:21Z","pushed_at":"2016-08-22T16:58:52Z","git_url":"git://github.com/ec-europa/platform-dev.git","ssh_url":"git@github.com:ec-europa/platform-dev.git","clone_url":"https://github.com/ec-europa/platform-dev.git","svn_url":"https://github.com/ec-europa/platform-dev","homepage":null,"size":54243,"stargazers_count":23,"watchers_count":23,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":38,"forks":18,"open_issues":38,"watchers":23,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ec-europa/platform-dev/pulls/827"},"html":{"href":"https://github.com/ec-europa/platform-dev/pull/827"},"issue":{"href":"https://api.github.com/repos/ec-europa/platform-dev/issues/827"},"comments":{"href":"https://api.github.com/repos/ec-europa/platform-dev/issues/827/comments"},"review_comments":{"href":"https://api.github.com/repos/ec-europa/platform-dev/pulls/827/comments"},"review_comment":{"href":"https://api.github.com/repos/ec-europa/platform-dev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ec-europa/platform-dev/pulls/827/commits"},"statuses":{"href":"https://api.github.com/repos/ec-europa/platform-dev/statuses/53de74c97929022eaba46df890eb23a442fc5275"}}}}
{"actor":{"display_login":"cyberwolf"}}