{"action":"created","comment":{"url":"https://api.github.com/repos/owncloud/core/pulls/comments/36415927","id":36415927,"diff_hunk":"@@ -0,0 +1,91 @@\n+<?php\n+\n+use Behat\\Behat\\Context\\BehatContext;\n+use GuzzleHttp\\Client;\n+use GuzzleHttp\\Message\\ResponseInterface;\n+\n+//\n+// Require 3rd-party libraries here:\n+//\n+//   require_once 'PHPUnit/Autoload.php';\n+//   require_once 'PHPUnit/Framework/Assert/Functions.php';\n+//\n+\n+/**\n+ * Features context.\n+ */\n+class FeatureContext extends BehatContext {\n+\n+    /** @var string */\n+    private $baseUrl = '';\n+\n+    /** @var ResponseInterface */\n+    private $response = null;\n+\n+\t/** @var string */\n+\tprivate $currentUser = '';\n+\n+\t/** @var int */\n+\tprivate $apiVersion = 1;\n+\n+    /**\n+     * Initializes context.\n+     * Every scenario gets it's own context object.\n+     *\n+     * @param array $parameters context parameters (set them up through behat.yml)\n+     */\n+    public function __construct(array $parameters) {\n+\n+        // Initialize your context here\n+\t\t$this->baseUrl = $parameters['baseUrl'];\n+\t\t$this->adminUser = $parameters['admin'];\n+    }\n+\n+    /**\n+     * @When /^sending \"([^\"]*)\" to \"([^\"]*)\"$/\n+     */\n+    public function sendingTo($verb, $url) {\n+        $fullUrl = $this->baseUrl . \"v{$this->apiVersion}.php\" . $url;\n+        $client = new Client();\n+        // TODO: get admin user from config\n+        $options = [];\n+\t\tif ($this->currentUser === 'admin') {\n+\t\t\t$options['auth'] = $this->adminUser;\n+\t\t}\n+\n+\t\ttry {\n+\t\t\t$this->response = $client->send($client->createRequest($verb, $fullUrl, $options));\n+\t\t} catch (\\GuzzleHttp\\Exception\\ClientException $ex) {\n+\t\t\t$this->response = $ex->getResponse();\n+\t\t}\n+    }\n+\n+    /**\n+     * @Then /^the status code should be \"([^\"]*)\"$/\n+     */\n+    public function theStatusCodeShouldBe($statusCode) {\n+        PHPUnit_Framework_Assert::assertEquals($statusCode, $this->response->getStatusCode());\n+    }\n+\n+    /**\n+     * @Given /^As an \"([^\"]*)\"$/\n+     */\n+    public function asAn($user) {\n+\t\t$this->currentUser = $user;\n+    }\n+\n+\t/**\n+\t * @Given /^using api version \"([^\"]*)\"$/\n+\t */\n+\tpublic function usingApiVersion($version) {\n+\t\t$this->apiVersion = $version;\n+\t}\n+\n+\t/**\n+\t * @Given /^user \"([^\"]*)\" exists$/\n+\t */\n+\tpublic function userExists($user) {\n+\t\tthrow new \\Behat\\Behat\\Exception\\PendingException();\n+\t}","path":"build/integration/features/bootstrap/FeatureContext.php","position":89,"original_position":89,"commit_id":"6534ed5f903d2dc99070bafd72ecca98964a0165","original_commit_id":"6534ed5f903d2dc99070bafd72ecca98964a0165","user":{"login":"LukasReschke","id":878997,"avatar_url":"https://avatars.githubusercontent.com/u/878997?v=3","gravatar_id":"","url":"https://api.github.com/users/LukasReschke","html_url":"https://github.com/LukasReschke","followers_url":"https://api.github.com/users/LukasReschke/followers","following_url":"https://api.github.com/users/LukasReschke/following{/other_user}","gists_url":"https://api.github.com/users/LukasReschke/gists{/gist_id}","starred_url":"https://api.github.com/users/LukasReschke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LukasReschke/subscriptions","organizations_url":"https://api.github.com/users/LukasReschke/orgs","repos_url":"https://api.github.com/users/LukasReschke/repos","events_url":"https://api.github.com/users/LukasReschke/events{/privacy}","received_events_url":"https://api.github.com/users/LukasReschke/received_events","type":"User","site_admin":false},"body":"![](http://www.quickmeme.com/img/5d/5d839ed0a680b4d1ce97c940d3dfc7df5dbf560db4f5bedec1f6a76d3b21ce6e.jpg)\r\n","created_at":"2015-08-06T13:51:20Z","updated_at":"2015-08-06T13:51:20Z","html_url":"https://github.com/owncloud/core/pull/18105#discussion_r36415927","pull_request_url":"https://api.github.com/repos/owncloud/core/pulls/18105","_links":{"self":{"href":"https://api.github.com/repos/owncloud/core/pulls/comments/36415927"},"html":{"href":"https://github.com/owncloud/core/pull/18105#discussion_r36415927"},"pull_request":{"href":"https://api.github.com/repos/owncloud/core/pulls/18105"}}},"pull_request":{"url":"https://api.github.com/repos/owncloud/core/pulls/18105","id":41789119,"html_url":"https://github.com/owncloud/core/pull/18105","diff_url":"https://github.com/owncloud/core/pull/18105.diff","patch_url":"https://github.com/owncloud/core/pull/18105.patch","issue_url":"https://api.github.com/repos/owncloud/core/issues/18105","number":18105,"state":"open","locked":false,"title":"First integration tests for provisioning api","user":{"login":"DeepDiver1975","id":1005065,"avatar_url":"https://avatars.githubusercontent.com/u/1005065?v=3","gravatar_id":"","url":"https://api.github.com/users/DeepDiver1975","html_url":"https://github.com/DeepDiver1975","followers_url":"https://api.github.com/users/DeepDiver1975/followers","following_url":"https://api.github.com/users/DeepDiver1975/following{/other_user}","gists_url":"https://api.github.com/users/DeepDiver1975/gists{/gist_id}","starred_url":"https://api.github.com/users/DeepDiver1975/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DeepDiver1975/subscriptions","organizations_url":"https://api.github.com/users/DeepDiver1975/orgs","repos_url":"https://api.github.com/users/DeepDiver1975/repos","events_url":"https://api.github.com/users/DeepDiver1975/events{/privacy}","received_events_url":"https://api.github.com/users/DeepDiver1975/received_events","type":"User","site_admin":false},"body":"@PVince81 @Raydiation @schiesbn @blizzz @karlitschek \r\n\r\nSo - before touching the provisioning api to implement V2 - I wanted to have integration tests to be sure nothing will be broken.\r\n\r\nTODO:\r\n- setup jenkins on this branch\r\n- integrate this into the regular ci mechanism (AFTER merge)\r\n- test all provisioning APIs\r\n- get coverage results\r\n\r\n\r\n","created_at":"2015-08-06T13:46:21Z","updated_at":"2015-08-06T13:51:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6dc5160219d1d14b5a70a7ecc44b9c7b91f0f2ef","assignee":null,"milestone":{"url":"https://api.github.com/repos/owncloud/core/milestones/37","html_url":"https://github.com/owncloud/core/milestones/8.2-current","labels_url":"https://api.github.com/repos/owncloud/core/milestones/37/labels","id":993629,"number":37,"title":"8.2-current","description":"","creator":{"login":"craigpg","id":160667,"avatar_url":"https://avatars.githubusercontent.com/u/160667?v=3","gravatar_id":"","url":"https://api.github.com/users/craigpg","html_url":"https://github.com/craigpg","followers_url":"https://api.github.com/users/craigpg/followers","following_url":"https://api.github.com/users/craigpg/following{/other_user}","gists_url":"https://api.github.com/users/craigpg/gists{/gist_id}","starred_url":"https://api.github.com/users/craigpg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigpg/subscriptions","organizations_url":"https://api.github.com/users/craigpg/orgs","repos_url":"https://api.github.com/users/craigpg/repos","events_url":"https://api.github.com/users/craigpg/events{/privacy}","received_events_url":"https://api.github.com/users/craigpg/received_events","type":"User","site_admin":false},"open_issues":634,"closed_issues":277,"state":"open","created_at":"2015-02-24T16:19:37Z","updated_at":"2015-08-06T13:46:21Z","due_on":"2015-10-20T04:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/owncloud/core/pulls/18105/commits","review_comments_url":"https://api.github.com/repos/owncloud/core/pulls/18105/comments","review_comment_url":"https://api.github.com/repos/owncloud/core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/owncloud/core/issues/18105/comments","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/6534ed5f903d2dc99070bafd72ecca98964a0165","head":{"label":"owncloud:ocs-api-integration-tests","ref":"ocs-api-integration-tests","sha":"6534ed5f903d2dc99070bafd72ecca98964a0165","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","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":5550552,"name":"core","full_name":"owncloud/core","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","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/core","description":"The ownCloud core","fork":false,"url":"https://api.github.com/repos/owncloud/core","forks_url":"https://api.github.com/repos/owncloud/core/forks","keys_url":"https://api.github.com/repos/owncloud/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/core/teams","hooks_url":"https://api.github.com/repos/owncloud/core/hooks","issue_events_url":"https://api.github.com/repos/owncloud/core/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/core/events","assignees_url":"https://api.github.com/repos/owncloud/core/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/core/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/core/tags","blobs_url":"https://api.github.com/repos/owncloud/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/core/languages","stargazers_url":"https://api.github.com/repos/owncloud/core/stargazers","contributors_url":"https://api.github.com/repos/owncloud/core/contributors","subscribers_url":"https://api.github.com/repos/owncloud/core/subscribers","subscription_url":"https://api.github.com/repos/owncloud/core/subscription","commits_url":"https://api.github.com/repos/owncloud/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/core/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/core/merges","archive_url":"https://api.github.com/repos/owncloud/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/core/downloads","issues_url":"https://api.github.com/repos/owncloud/core/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/core/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/core/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/core/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/core/releases{/id}","created_at":"2012-08-25T10:32:48Z","updated_at":"2015-08-06T09:08:02Z","pushed_at":"2015-08-06T13:47:26Z","git_url":"git://github.com/owncloud/core.git","ssh_url":"git@github.com:owncloud/core.git","clone_url":"https://github.com/owncloud/core.git","svn_url":"https://github.com/owncloud/core","homepage":"https://owncloud.org/","size":1076224,"stargazers_count":3530,"watchers_count":3530,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1132,"mirror_url":null,"open_issues_count":1945,"forks":1132,"open_issues":1945,"watchers":3530,"default_branch":"master"}},"base":{"label":"owncloud:master","ref":"master","sha":"6c139674a4dc6b9984bb303d7006854a6c9c6f3b","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","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":5550552,"name":"core","full_name":"owncloud/core","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","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/core","description":"The ownCloud core","fork":false,"url":"https://api.github.com/repos/owncloud/core","forks_url":"https://api.github.com/repos/owncloud/core/forks","keys_url":"https://api.github.com/repos/owncloud/core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/core/teams","hooks_url":"https://api.github.com/repos/owncloud/core/hooks","issue_events_url":"https://api.github.com/repos/owncloud/core/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/core/events","assignees_url":"https://api.github.com/repos/owncloud/core/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/core/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/core/tags","blobs_url":"https://api.github.com/repos/owncloud/core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/core/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/core/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/core/languages","stargazers_url":"https://api.github.com/repos/owncloud/core/stargazers","contributors_url":"https://api.github.com/repos/owncloud/core/contributors","subscribers_url":"https://api.github.com/repos/owncloud/core/subscribers","subscription_url":"https://api.github.com/repos/owncloud/core/subscription","commits_url":"https://api.github.com/repos/owncloud/core/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/core/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/core/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/core/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/core/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/core/merges","archive_url":"https://api.github.com/repos/owncloud/core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/core/downloads","issues_url":"https://api.github.com/repos/owncloud/core/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/core/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/core/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/core/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/core/releases{/id}","created_at":"2012-08-25T10:32:48Z","updated_at":"2015-08-06T09:08:02Z","pushed_at":"2015-08-06T13:47:26Z","git_url":"git://github.com/owncloud/core.git","ssh_url":"git@github.com:owncloud/core.git","clone_url":"https://github.com/owncloud/core.git","svn_url":"https://github.com/owncloud/core","homepage":"https://owncloud.org/","size":1076224,"stargazers_count":3530,"watchers_count":3530,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1132,"mirror_url":null,"open_issues_count":1945,"forks":1132,"open_issues":1945,"watchers":3530,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/owncloud/core/pulls/18105"},"html":{"href":"https://github.com/owncloud/core/pull/18105"},"issue":{"href":"https://api.github.com/repos/owncloud/core/issues/18105"},"comments":{"href":"https://api.github.com/repos/owncloud/core/issues/18105/comments"},"review_comments":{"href":"https://api.github.com/repos/owncloud/core/pulls/18105/comments"},"review_comment":{"href":"https://api.github.com/repos/owncloud/core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/owncloud/core/pulls/18105/commits"},"statuses":{"href":"https://api.github.com/repos/owncloud/core/statuses/6534ed5f903d2dc99070bafd72ecca98964a0165"}}}}