{"action":"created","comment":{"url":"https://api.github.com/repos/owncloud/user_ldap/pulls/comments/170848989","pull_request_review_id":99590504,"id":170848989,"diff_hunk":"@@ -0,0 +1,229 @@\n+<?php\n+/**\n+ * ownCloud\n+ *\n+ * @author Artur Neumann <artur@jankaritech.com>\n+ * @copyright Copyright (c) 2018 Artur Neumann artur@jankaritech.com\n+ *\n+ * This library is free software; you can redistribute it and/or\n+ * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE\n+ * License as published by the Free Software Foundation; either\n+ * version 3 of the License, or any later version.\n+ *\n+ * This library is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU AFFERO GENERAL PUBLIC LICENSE for more details.\n+ *\n+ * You should have received a copy of the GNU Affero General Public\n+ * License along with this library.  If not, see <http://www.gnu.org/licenses/>.\n+ *\n+ */\n+\n+use Behat\\Behat\\Context\\Context;\n+use Behat\\Behat\\Hook\\Scope\\BeforeScenarioScope;\n+use Behat\\Gherkin\\Node\\TableNode;\n+use Behat\\MinkExtension\\Context\\RawMinkContext;\n+use TestHelpers\\SetupHelper;\n+\n+\n+require_once 'bootstrap.php';\n+\n+/**\n+ * LDAP context.\n+ */\n+class UserLdapContext extends RawMinkContext implements Context {\n+\n+\tprivate $oldConfig = [];\n+\t/**\n+\t * \n+\t * @var Zend\\Ldap\\Ldap\n+\t */\n+\tprivate $ldap;\n+\tprivate $ldapAdminUser;\n+\tprivate $ldapAdminPassword;\n+\tprivate $ldapBaseDN;\n+\tprivate $ldapHost;\n+\tprivate $ldapUsersOU;\n+\tprivate $ldapGroupsOU;\n+\t\n+\t/**\n+\t * @Given the LDAP config :configId has the key :configKey set to :configValue\n+\t * @param string $configId\n+\t * @param string $configKey\n+\t * @param string $configValue\n+\t * @return void\n+\t */\n+\tpublic function theLdapConfigHasTheKeySetTo(\n+\t\t$configId, $configKey, $configValue\n+\t) {\n+\t\t//remember old settings to be able to set them back after test run\n+\t\t$occResult = SetupHelper::runOcc(\n+\t\t\t['ldap:show-config', $configId, \"--output=json\"]\n+\t\t);\n+\t\tif ($occResult['code'] !== \"0\") {\n+\t\t\tthrow new Exception(\n+\t\t\t\t\"could not read LDAP settings \" . $occResult['stdErr']\n+\t\t\t);\n+\t\t}\n+\t\t$originalConfig = json_decode($occResult['stdOut'], true);\n+\t\tif (isset($originalConfig[$configKey])) {\n+\t\t\t$this->oldConfig[$configId][$configKey] = $originalConfig[$configKey];\n+\t\t} else {\n+\t\t\t$this->oldConfig[$configId][$configKey] = \"\";\n+\t\t}\n+\t\t\n+\t\t$this->setLdapSetting($configId, $configKey, $configValue);\n+\t}\n+\n+\t/**\n+\t * @Given the LDAP config :configId has these settings:\n+\t * @param string $configId\n+\t * @param TableNode $table with the headings |key | value |\n+\t * @return void\n+\t */\n+\tpublic function theLdapConfigHasTheseSettings($configId, TableNode $table) {\n+\t\tforeach ($table as $line) {\n+\t\t\t$this->theLdapConfigHasTheKeySetTo(\n+\t\t\t\t$configId, $line['key'], $line['value']\n+\t\t\t);\n+\t\t}\n+\t}\n+\n+\t/**\n+\t * @Given the LDAP users have been resyncted\n+\t * @throws Exception\n+\t * @return void\n+\t */\n+\tpublic function theLdapUsersHaveBeenResyncted() {","path":"tests/acceptance/features/bootstrap/UserLdapContext.php","position":98,"original_position":98,"commit_id":"83b5d057618f21a4a8ba34d8ec55367525e5d8b1","original_commit_id":"83b5d057618f21a4a8ba34d8ec55367525e5d8b1","user":{"login":"butonic","id":956847,"avatar_url":"https://avatars0.githubusercontent.com/u/956847?v=4","gravatar_id":"","url":"https://api.github.com/users/butonic","html_url":"https://github.com/butonic","followers_url":"https://api.github.com/users/butonic/followers","following_url":"https://api.github.com/users/butonic/following{/other_user}","gists_url":"https://api.github.com/users/butonic/gists{/gist_id}","starred_url":"https://api.github.com/users/butonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/butonic/subscriptions","organizations_url":"https://api.github.com/users/butonic/orgs","repos_url":"https://api.github.com/users/butonic/repos","events_url":"https://api.github.com/users/butonic/events{/privacy}","received_events_url":"https://api.github.com/users/butonic/received_events","type":"User","site_admin":false},"body":"typo: resyncted -t => resynced","created_at":"2018-02-27T08:43:39Z","updated_at":"2018-02-27T08:47:31Z","html_url":"https://github.com/owncloud/user_ldap/pull/183#discussion_r170848989","pull_request_url":"https://api.github.com/repos/owncloud/user_ldap/pulls/183","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/owncloud/user_ldap/pulls/comments/170848989"},"html":{"href":"https://github.com/owncloud/user_ldap/pull/183#discussion_r170848989"},"pull_request":{"href":"https://api.github.com/repos/owncloud/user_ldap/pulls/183"}}},"pull_request":{"url":"https://api.github.com/repos/owncloud/user_ldap/pulls/183","id":170408598,"html_url":"https://github.com/owncloud/user_ldap/pull/183","diff_url":"https://github.com/owncloud/user_ldap/pull/183.diff","patch_url":"https://github.com/owncloud/user_ldap/pull/183.patch","issue_url":"https://api.github.com/repos/owncloud/user_ldap/issues/183","number":183,"state":"open","locked":false,"title":"[WIP] acceptance tests infrastructure and login tests","user":{"login":"individual-it","id":2425577,"avatar_url":"https://avatars1.githubusercontent.com/u/2425577?v=4","gravatar_id":"","url":"https://api.github.com/users/individual-it","html_url":"https://github.com/individual-it","followers_url":"https://api.github.com/users/individual-it/followers","following_url":"https://api.github.com/users/individual-it/following{/other_user}","gists_url":"https://api.github.com/users/individual-it/gists{/gist_id}","starred_url":"https://api.github.com/users/individual-it/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/individual-it/subscriptions","organizations_url":"https://api.github.com/users/individual-it/orgs","repos_url":"https://api.github.com/users/individual-it/repos","events_url":"https://api.github.com/users/individual-it/events{/privacy}","received_events_url":"https://api.github.com/users/individual-it/received_events","type":"User","site_admin":false},"body":"the first proposal for running acceptance tests. In this case they are UI tests but I would also include API tests here","created_at":"2018-02-21T08:57:43Z","updated_at":"2018-02-27T08:47:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"13c1317a1807d0c1c3768c7e38ec39689de377a8","assignee":null,"assignees":[],"requested_reviewers":[{"login":"tomneedham","id":660805,"avatar_url":"https://avatars1.githubusercontent.com/u/660805?v=4","gravatar_id":"","url":"https://api.github.com/users/tomneedham","html_url":"https://github.com/tomneedham","followers_url":"https://api.github.com/users/tomneedham/followers","following_url":"https://api.github.com/users/tomneedham/following{/other_user}","gists_url":"https://api.github.com/users/tomneedham/gists{/gist_id}","starred_url":"https://api.github.com/users/tomneedham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomneedham/subscriptions","organizations_url":"https://api.github.com/users/tomneedham/orgs","repos_url":"https://api.github.com/users/tomneedham/repos","events_url":"https://api.github.com/users/tomneedham/events{/privacy}","received_events_url":"https://api.github.com/users/tomneedham/received_events","type":"User","site_admin":false},{"login":"felixheidecke","id":12717530,"avatar_url":"https://avatars0.githubusercontent.com/u/12717530?v=4","gravatar_id":"","url":"https://api.github.com/users/felixheidecke","html_url":"https://github.com/felixheidecke","followers_url":"https://api.github.com/users/felixheidecke/followers","following_url":"https://api.github.com/users/felixheidecke/following{/other_user}","gists_url":"https://api.github.com/users/felixheidecke/gists{/gist_id}","starred_url":"https://api.github.com/users/felixheidecke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/felixheidecke/subscriptions","organizations_url":"https://api.github.com/users/felixheidecke/orgs","repos_url":"https://api.github.com/users/felixheidecke/repos","events_url":"https://api.github.com/users/felixheidecke/events{/privacy}","received_events_url":"https://api.github.com/users/felixheidecke/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/owncloud/user_ldap/pulls/183/commits","review_comments_url":"https://api.github.com/repos/owncloud/user_ldap/pulls/183/comments","review_comment_url":"https://api.github.com/repos/owncloud/user_ldap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/owncloud/user_ldap/issues/183/comments","statuses_url":"https://api.github.com/repos/owncloud/user_ldap/statuses/83b5d057618f21a4a8ba34d8ec55367525e5d8b1","head":{"label":"owncloud:acceptance-tests-login-email","ref":"acceptance-tests-login-email","sha":"83b5d057618f21a4a8ba34d8ec55367525e5d8b1","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":67518380,"name":"user_ldap","full_name":"owncloud/user_ldap","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/user_ldap","description":"📒","fork":false,"url":"https://api.github.com/repos/owncloud/user_ldap","forks_url":"https://api.github.com/repos/owncloud/user_ldap/forks","keys_url":"https://api.github.com/repos/owncloud/user_ldap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/user_ldap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/user_ldap/teams","hooks_url":"https://api.github.com/repos/owncloud/user_ldap/hooks","issue_events_url":"https://api.github.com/repos/owncloud/user_ldap/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/user_ldap/events","assignees_url":"https://api.github.com/repos/owncloud/user_ldap/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/user_ldap/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/user_ldap/tags","blobs_url":"https://api.github.com/repos/owncloud/user_ldap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/user_ldap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/user_ldap/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/user_ldap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/user_ldap/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/user_ldap/languages","stargazers_url":"https://api.github.com/repos/owncloud/user_ldap/stargazers","contributors_url":"https://api.github.com/repos/owncloud/user_ldap/contributors","subscribers_url":"https://api.github.com/repos/owncloud/user_ldap/subscribers","subscription_url":"https://api.github.com/repos/owncloud/user_ldap/subscription","commits_url":"https://api.github.com/repos/owncloud/user_ldap/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/user_ldap/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/user_ldap/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/user_ldap/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/user_ldap/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/user_ldap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/user_ldap/merges","archive_url":"https://api.github.com/repos/owncloud/user_ldap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/user_ldap/downloads","issues_url":"https://api.github.com/repos/owncloud/user_ldap/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/user_ldap/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/user_ldap/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/user_ldap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/user_ldap/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/user_ldap/releases{/id}","deployments_url":"https://api.github.com/repos/owncloud/user_ldap/deployments","created_at":"2016-09-06T14:59:09Z","updated_at":"2017-04-28T07:04:55Z","pushed_at":"2018-02-27T08:42:15Z","git_url":"git://github.com/owncloud/user_ldap.git","ssh_url":"git@github.com:owncloud/user_ldap.git","clone_url":"https://github.com/owncloud/user_ldap.git","svn_url":"https://github.com/owncloud/user_ldap","homepage":"","size":7152,"stargazers_count":7,"watchers_count":7,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":53,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":12,"open_issues":53,"watchers":7,"default_branch":"master"}},"base":{"label":"owncloud:master","ref":"master","sha":"1462b4cfbfb071d7947c36c65ed27bbaad0c0ca6","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":67518380,"name":"user_ldap","full_name":"owncloud/user_ldap","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars3.githubusercontent.com/u/1645051?v=4","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/user_ldap","description":"📒","fork":false,"url":"https://api.github.com/repos/owncloud/user_ldap","forks_url":"https://api.github.com/repos/owncloud/user_ldap/forks","keys_url":"https://api.github.com/repos/owncloud/user_ldap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/user_ldap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/user_ldap/teams","hooks_url":"https://api.github.com/repos/owncloud/user_ldap/hooks","issue_events_url":"https://api.github.com/repos/owncloud/user_ldap/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/user_ldap/events","assignees_url":"https://api.github.com/repos/owncloud/user_ldap/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/user_ldap/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/user_ldap/tags","blobs_url":"https://api.github.com/repos/owncloud/user_ldap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/user_ldap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/user_ldap/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/user_ldap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/user_ldap/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/user_ldap/languages","stargazers_url":"https://api.github.com/repos/owncloud/user_ldap/stargazers","contributors_url":"https://api.github.com/repos/owncloud/user_ldap/contributors","subscribers_url":"https://api.github.com/repos/owncloud/user_ldap/subscribers","subscription_url":"https://api.github.com/repos/owncloud/user_ldap/subscription","commits_url":"https://api.github.com/repos/owncloud/user_ldap/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/user_ldap/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/user_ldap/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/user_ldap/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/user_ldap/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/user_ldap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/user_ldap/merges","archive_url":"https://api.github.com/repos/owncloud/user_ldap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/user_ldap/downloads","issues_url":"https://api.github.com/repos/owncloud/user_ldap/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/user_ldap/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/user_ldap/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/user_ldap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/user_ldap/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/user_ldap/releases{/id}","deployments_url":"https://api.github.com/repos/owncloud/user_ldap/deployments","created_at":"2016-09-06T14:59:09Z","updated_at":"2017-04-28T07:04:55Z","pushed_at":"2018-02-27T08:42:15Z","git_url":"git://github.com/owncloud/user_ldap.git","ssh_url":"git@github.com:owncloud/user_ldap.git","clone_url":"https://github.com/owncloud/user_ldap.git","svn_url":"https://github.com/owncloud/user_ldap","homepage":"","size":7152,"stargazers_count":7,"watchers_count":7,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":12,"mirror_url":null,"archived":false,"open_issues_count":53,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":12,"open_issues":53,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/owncloud/user_ldap/pulls/183"},"html":{"href":"https://github.com/owncloud/user_ldap/pull/183"},"issue":{"href":"https://api.github.com/repos/owncloud/user_ldap/issues/183"},"comments":{"href":"https://api.github.com/repos/owncloud/user_ldap/issues/183/comments"},"review_comments":{"href":"https://api.github.com/repos/owncloud/user_ldap/pulls/183/comments"},"review_comment":{"href":"https://api.github.com/repos/owncloud/user_ldap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/owncloud/user_ldap/pulls/183/commits"},"statuses":{"href":"https://api.github.com/repos/owncloud/user_ldap/statuses/83b5d057618f21a4a8ba34d8ec55367525e5d8b1"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"butonic"}}