{"action":"created","comment":{"url":"https://api.github.com/repos/thephpleague/tactician/pulls/comments/28006056","id":28006056,"diff_hunk":"@@ -67,4 +68,24 @@ public function testHandleThrowExceptionForInvalidCommand()\n     {\n         (new CommandBus([]))->handle('must be an object');\n     }\n+\n+    public function testIfOneCanOnlyCreateWithValidMiddlewares()\n+    {\n+        $middlewareList = [$this->getMock('stdClass')];\n+\n+        try {\n+            new CommandBus($middlewareList);\n+            $this->fail('Should not be able to create a CommandBus without a valid list of middlewares!');\n+        } catch (InvalidMiddlewareException $caught) {","path":"tests/CommandBusTest.php","position":null,"original_position":20,"commit_id":"c41f3bab4660404d249c931f08b7dc553d8fa483","original_commit_id":"9b8101a6386d7c0a065763b91dd89b83d0d5ee2a","user":{"login":"rtuin","id":360150,"avatar_url":"https://avatars.githubusercontent.com/u/360150?v=3","gravatar_id":"","url":"https://api.github.com/users/rtuin","html_url":"https://github.com/rtuin","followers_url":"https://api.github.com/users/rtuin/followers","following_url":"https://api.github.com/users/rtuin/following{/other_user}","gists_url":"https://api.github.com/users/rtuin/gists{/gist_id}","starred_url":"https://api.github.com/users/rtuin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtuin/subscriptions","organizations_url":"https://api.github.com/users/rtuin/orgs","repos_url":"https://api.github.com/users/rtuin/repos","events_url":"https://api.github.com/users/rtuin/events{/privacy}","received_events_url":"https://api.github.com/users/rtuin/received_events","type":"User","site_admin":false},"body":"Hah, interesting indeed! I cleaned up the test method a bit accordingly :+1: ","created_at":"2015-04-08T19:51:12Z","updated_at":"2015-04-08T19:51:12Z","html_url":"https://github.com/thephpleague/tactician/pull/56#discussion_r28006056","pull_request_url":"https://api.github.com/repos/thephpleague/tactician/pulls/56","_links":{"self":{"href":"https://api.github.com/repos/thephpleague/tactician/pulls/comments/28006056"},"html":{"href":"https://github.com/thephpleague/tactician/pull/56#discussion_r28006056"},"pull_request":{"href":"https://api.github.com/repos/thephpleague/tactician/pulls/56"}}},"pull_request":{"url":"https://api.github.com/repos/thephpleague/tactician/pulls/56","id":32696950,"html_url":"https://github.com/thephpleague/tactician/pull/56","diff_url":"https://github.com/thephpleague/tactician/pull/56.diff","patch_url":"https://github.com/thephpleague/tactician/pull/56.patch","issue_url":"https://api.github.com/repos/thephpleague/tactician/issues/56","number":56,"state":"open","locked":false,"title":"Make sure that only valid middlewares are accepted","user":{"login":"rtuin","id":360150,"avatar_url":"https://avatars.githubusercontent.com/u/360150?v=3","gravatar_id":"","url":"https://api.github.com/users/rtuin","html_url":"https://github.com/rtuin","followers_url":"https://api.github.com/users/rtuin/followers","following_url":"https://api.github.com/users/rtuin/following{/other_user}","gists_url":"https://api.github.com/users/rtuin/gists{/gist_id}","starred_url":"https://api.github.com/users/rtuin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtuin/subscriptions","organizations_url":"https://api.github.com/users/rtuin/orgs","repos_url":"https://api.github.com/users/rtuin/repos","events_url":"https://api.github.com/users/rtuin/events{/privacy}","received_events_url":"https://api.github.com/users/rtuin/received_events","type":"User","site_admin":false},"body":"This should cover the issue found in https://github.com/thephpleague/tactician/issues/54","created_at":"2015-04-06T18:08:27Z","updated_at":"2015-04-08T19:51:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ad7096379f98bbb858cd8401020f0882cc332994","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thephpleague/tactician/pulls/56/commits","review_comments_url":"https://api.github.com/repos/thephpleague/tactician/pulls/56/comments","review_comment_url":"https://api.github.com/repos/thephpleague/tactician/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thephpleague/tactician/issues/56/comments","statuses_url":"https://api.github.com/repos/thephpleague/tactician/statuses/c41f3bab4660404d249c931f08b7dc553d8fa483","head":{"label":"rtuin:feature/check-middleware-list-validity","ref":"feature/check-middleware-list-validity","sha":"c41f3bab4660404d249c931f08b7dc553d8fa483","user":{"login":"rtuin","id":360150,"avatar_url":"https://avatars.githubusercontent.com/u/360150?v=3","gravatar_id":"","url":"https://api.github.com/users/rtuin","html_url":"https://github.com/rtuin","followers_url":"https://api.github.com/users/rtuin/followers","following_url":"https://api.github.com/users/rtuin/following{/other_user}","gists_url":"https://api.github.com/users/rtuin/gists{/gist_id}","starred_url":"https://api.github.com/users/rtuin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtuin/subscriptions","organizations_url":"https://api.github.com/users/rtuin/orgs","repos_url":"https://api.github.com/users/rtuin/repos","events_url":"https://api.github.com/users/rtuin/events{/privacy}","received_events_url":"https://api.github.com/users/rtuin/received_events","type":"User","site_admin":false},"repo":{"id":33495989,"name":"tactician","full_name":"rtuin/tactician","owner":{"login":"rtuin","id":360150,"avatar_url":"https://avatars.githubusercontent.com/u/360150?v=3","gravatar_id":"","url":"https://api.github.com/users/rtuin","html_url":"https://github.com/rtuin","followers_url":"https://api.github.com/users/rtuin/followers","following_url":"https://api.github.com/users/rtuin/following{/other_user}","gists_url":"https://api.github.com/users/rtuin/gists{/gist_id}","starred_url":"https://api.github.com/users/rtuin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rtuin/subscriptions","organizations_url":"https://api.github.com/users/rtuin/orgs","repos_url":"https://api.github.com/users/rtuin/repos","events_url":"https://api.github.com/users/rtuin/events{/privacy}","received_events_url":"https://api.github.com/users/rtuin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rtuin/tactician","description":"A simple, flexible command bus","fork":true,"url":"https://api.github.com/repos/rtuin/tactician","forks_url":"https://api.github.com/repos/rtuin/tactician/forks","keys_url":"https://api.github.com/repos/rtuin/tactician/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rtuin/tactician/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rtuin/tactician/teams","hooks_url":"https://api.github.com/repos/rtuin/tactician/hooks","issue_events_url":"https://api.github.com/repos/rtuin/tactician/issues/events{/number}","events_url":"https://api.github.com/repos/rtuin/tactician/events","assignees_url":"https://api.github.com/repos/rtuin/tactician/assignees{/user}","branches_url":"https://api.github.com/repos/rtuin/tactician/branches{/branch}","tags_url":"https://api.github.com/repos/rtuin/tactician/tags","blobs_url":"https://api.github.com/repos/rtuin/tactician/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rtuin/tactician/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rtuin/tactician/git/refs{/sha}","trees_url":"https://api.github.com/repos/rtuin/tactician/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rtuin/tactician/statuses/{sha}","languages_url":"https://api.github.com/repos/rtuin/tactician/languages","stargazers_url":"https://api.github.com/repos/rtuin/tactician/stargazers","contributors_url":"https://api.github.com/repos/rtuin/tactician/contributors","subscribers_url":"https://api.github.com/repos/rtuin/tactician/subscribers","subscription_url":"https://api.github.com/repos/rtuin/tactician/subscription","commits_url":"https://api.github.com/repos/rtuin/tactician/commits{/sha}","git_commits_url":"https://api.github.com/repos/rtuin/tactician/git/commits{/sha}","comments_url":"https://api.github.com/repos/rtuin/tactician/comments{/number}","issue_comment_url":"https://api.github.com/repos/rtuin/tactician/issues/comments{/number}","contents_url":"https://api.github.com/repos/rtuin/tactician/contents/{+path}","compare_url":"https://api.github.com/repos/rtuin/tactician/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rtuin/tactician/merges","archive_url":"https://api.github.com/repos/rtuin/tactician/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rtuin/tactician/downloads","issues_url":"https://api.github.com/repos/rtuin/tactician/issues{/number}","pulls_url":"https://api.github.com/repos/rtuin/tactician/pulls{/number}","milestones_url":"https://api.github.com/repos/rtuin/tactician/milestones{/number}","notifications_url":"https://api.github.com/repos/rtuin/tactician/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rtuin/tactician/labels{/name}","releases_url":"https://api.github.com/repos/rtuin/tactician/releases{/id}","created_at":"2015-04-06T17:47:30Z","updated_at":"2015-04-06T17:47:30Z","pushed_at":"2015-04-08T19:50:17Z","git_url":"git://github.com/rtuin/tactician.git","ssh_url":"git@github.com:rtuin/tactician.git","clone_url":"https://github.com/rtuin/tactician.git","svn_url":"https://github.com/rtuin/tactician","homepage":"http://tactician.thephpleague.com","size":988,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"thephpleague:master","ref":"master","sha":"69d82bd7e554139e0f1ffc749534757a40967662","user":{"login":"thephpleague","id":527621,"avatar_url":"https://avatars.githubusercontent.com/u/527621?v=3","gravatar_id":"","url":"https://api.github.com/users/thephpleague","html_url":"https://github.com/thephpleague","followers_url":"https://api.github.com/users/thephpleague/followers","following_url":"https://api.github.com/users/thephpleague/following{/other_user}","gists_url":"https://api.github.com/users/thephpleague/gists{/gist_id}","starred_url":"https://api.github.com/users/thephpleague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thephpleague/subscriptions","organizations_url":"https://api.github.com/users/thephpleague/orgs","repos_url":"https://api.github.com/users/thephpleague/repos","events_url":"https://api.github.com/users/thephpleague/events{/privacy}","received_events_url":"https://api.github.com/users/thephpleague/received_events","type":"Organization","site_admin":false},"repo":{"id":28866000,"name":"tactician","full_name":"thephpleague/tactician","owner":{"login":"thephpleague","id":527621,"avatar_url":"https://avatars.githubusercontent.com/u/527621?v=3","gravatar_id":"","url":"https://api.github.com/users/thephpleague","html_url":"https://github.com/thephpleague","followers_url":"https://api.github.com/users/thephpleague/followers","following_url":"https://api.github.com/users/thephpleague/following{/other_user}","gists_url":"https://api.github.com/users/thephpleague/gists{/gist_id}","starred_url":"https://api.github.com/users/thephpleague/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thephpleague/subscriptions","organizations_url":"https://api.github.com/users/thephpleague/orgs","repos_url":"https://api.github.com/users/thephpleague/repos","events_url":"https://api.github.com/users/thephpleague/events{/privacy}","received_events_url":"https://api.github.com/users/thephpleague/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thephpleague/tactician","description":"A simple, flexible command bus","fork":false,"url":"https://api.github.com/repos/thephpleague/tactician","forks_url":"https://api.github.com/repos/thephpleague/tactician/forks","keys_url":"https://api.github.com/repos/thephpleague/tactician/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thephpleague/tactician/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thephpleague/tactician/teams","hooks_url":"https://api.github.com/repos/thephpleague/tactician/hooks","issue_events_url":"https://api.github.com/repos/thephpleague/tactician/issues/events{/number}","events_url":"https://api.github.com/repos/thephpleague/tactician/events","assignees_url":"https://api.github.com/repos/thephpleague/tactician/assignees{/user}","branches_url":"https://api.github.com/repos/thephpleague/tactician/branches{/branch}","tags_url":"https://api.github.com/repos/thephpleague/tactician/tags","blobs_url":"https://api.github.com/repos/thephpleague/tactician/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thephpleague/tactician/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thephpleague/tactician/git/refs{/sha}","trees_url":"https://api.github.com/repos/thephpleague/tactician/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thephpleague/tactician/statuses/{sha}","languages_url":"https://api.github.com/repos/thephpleague/tactician/languages","stargazers_url":"https://api.github.com/repos/thephpleague/tactician/stargazers","contributors_url":"https://api.github.com/repos/thephpleague/tactician/contributors","subscribers_url":"https://api.github.com/repos/thephpleague/tactician/subscribers","subscription_url":"https://api.github.com/repos/thephpleague/tactician/subscription","commits_url":"https://api.github.com/repos/thephpleague/tactician/commits{/sha}","git_commits_url":"https://api.github.com/repos/thephpleague/tactician/git/commits{/sha}","comments_url":"https://api.github.com/repos/thephpleague/tactician/comments{/number}","issue_comment_url":"https://api.github.com/repos/thephpleague/tactician/issues/comments{/number}","contents_url":"https://api.github.com/repos/thephpleague/tactician/contents/{+path}","compare_url":"https://api.github.com/repos/thephpleague/tactician/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thephpleague/tactician/merges","archive_url":"https://api.github.com/repos/thephpleague/tactician/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thephpleague/tactician/downloads","issues_url":"https://api.github.com/repos/thephpleague/tactician/issues{/number}","pulls_url":"https://api.github.com/repos/thephpleague/tactician/pulls{/number}","milestones_url":"https://api.github.com/repos/thephpleague/tactician/milestones{/number}","notifications_url":"https://api.github.com/repos/thephpleague/tactician/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thephpleague/tactician/labels{/name}","releases_url":"https://api.github.com/repos/thephpleague/tactician/releases{/id}","created_at":"2015-01-06T14:03:17Z","updated_at":"2015-04-08T14:08:43Z","pushed_at":"2015-04-08T19:50:18Z","git_url":"git://github.com/thephpleague/tactician.git","ssh_url":"git@github.com:thephpleague/tactician.git","clone_url":"https://github.com/thephpleague/tactician.git","svn_url":"https://github.com/thephpleague/tactician","homepage":"http://tactician.thephpleague.com","size":988,"stargazers_count":107,"watchers_count":107,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":16,"mirror_url":null,"open_issues_count":6,"forks":16,"open_issues":6,"watchers":107,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thephpleague/tactician/pulls/56"},"html":{"href":"https://github.com/thephpleague/tactician/pull/56"},"issue":{"href":"https://api.github.com/repos/thephpleague/tactician/issues/56"},"comments":{"href":"https://api.github.com/repos/thephpleague/tactician/issues/56/comments"},"review_comments":{"href":"https://api.github.com/repos/thephpleague/tactician/pulls/56/comments"},"review_comment":{"href":"https://api.github.com/repos/thephpleague/tactician/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thephpleague/tactician/pulls/56/commits"},"statuses":{"href":"https://api.github.com/repos/thephpleague/tactician/statuses/c41f3bab4660404d249c931f08b7dc553d8fa483"}}}}