{"action":"created","comment":{"url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/comments/35092733","id":35092733,"diff_hunk":"@@ -0,0 +1,86 @@\n+<?php\n+/**\n+ * Part of Windwalker project Test files.\n+ *\n+ * @copyright  Copyright (C) 2011 - 2014 SMS Taiwan, Inc. All rights reserved.\n+ * @license    GNU General Public License version 2 or later; see LICENSE\n+ */\n+\n+namespace Windwalker\\Model\\Exception;\n+\n+use Windwalker\\Model\\Exception\\ValidateFailException;\n+use Windwalker\\Test\\TestHelper;\n+\n+/**\n+ * Test class of ValidateFailException\n+ *\n+ * @since {DEPLOY_VERSION}\n+ */\n+class ValidateFailExceptionTest extends \\PHPUnit_Framework_TestCase\n+{\n+\t/**\n+\t * Method to test ValidateFailException::getErrors.\n+\t *\n+\t * @param array $data\n+\t *\n+\t * @return void\n+\t *\n+\t * @dataProvider getErrorsDataProvider\n+\t * @covers       Windwalker\\Model\\Exception\\ValidateFailException::getErrors\n+\t * @group        getErrors\n+\t */\n+\tpublic function testGetErrors($data)\n+\t{\n+\t\t$obj = new ValidateFailException($data);\n+\n+\t\t$expected = TestHelper::getValue($obj, 'errors');\n+\n+\t\t$this->assertSame($expected, $obj->getErrors());\n+\t}\n+\n+\t/**\n+\t * getErrorsDataProvider\n+\t *\n+\t * @return array\n+\t */\n+\tpublic function getErrorsDataProvider()\n+\t{\n+\t\treturn array(\n+\t\t\tarray(array()),\n+\t\t\tarray(array(false)),\n+\t\t\tarray(array('Warning')),\n+\t\t);\n+\t}\n+\n+\t/**\n+\t * Method to test ValidateFailException::setErrors.\n+\t *\n+\t * @param array $data\n+\t *\n+\t * @return void\n+\t *\n+\t * @dataProvider setErrorsDataProvider\n+\t * @covers       Windwalker\\Model\\Exception\\ValidateFailException::setErrors\n+\t * @group        setErrors\n+\t */\n+\tpublic function testSetErrors($data)\n+\t{\n+\t\t$obj = new ValidateFailException($data);\n+\n+\t\t$this->assertInstanceOf('Windwalker\\Model\\Exception\\ValidateFailException', $obj->setErrors($data));","path":"test/Model/Exception/ValidateFailExceptionTest.php","position":68,"original_position":70,"commit_id":"5a3c7265ca5359db8b045fcb57ba763ad6b8357a","original_commit_id":"1c608686b0e7a3a980c4e1c5e47ae866d0020e3b","user":{"login":"gundamew","id":2278214,"avatar_url":"https://avatars.githubusercontent.com/u/2278214?v=3","gravatar_id":"","url":"https://api.github.com/users/gundamew","html_url":"https://github.com/gundamew","followers_url":"https://api.github.com/users/gundamew/followers","following_url":"https://api.github.com/users/gundamew/following{/other_user}","gists_url":"https://api.github.com/users/gundamew/gists{/gist_id}","starred_url":"https://api.github.com/users/gundamew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gundamew/subscriptions","organizations_url":"https://api.github.com/users/gundamew/orgs","repos_url":"https://api.github.com/users/gundamew/repos","events_url":"https://api.github.com/users/gundamew/events{/privacy}","received_events_url":"https://api.github.com/users/gundamew/received_events","type":"User","site_admin":false},"body":"> 也許你可以先對這樣的描述提出你疑惑的地方吧\r\n\r\n因為對於這樣一個簡單得似乎「理所當然」的描述，我除了「那要怎麼做」以外，想不到其他合理的疑問，而只回答「那要怎麼做」\r\n\r\n我是不知道為什麼你會想到要再 new 一個物件來 assert...","created_at":"2015-07-21T11:36:02Z","updated_at":"2015-07-21T11:36:02Z","html_url":"https://github.com/smstw/windwalker-joomla-rad/pull/101#discussion_r35092733","pull_request_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/101","_links":{"self":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/comments/35092733"},"html":{"href":"https://github.com/smstw/windwalker-joomla-rad/pull/101#discussion_r35092733"},"pull_request":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/101"}}},"pull_request":{"url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/101","id":40438643,"html_url":"https://github.com/smstw/windwalker-joomla-rad/pull/101","diff_url":"https://github.com/smstw/windwalker-joomla-rad/pull/101.diff","patch_url":"https://github.com/smstw/windwalker-joomla-rad/pull/101.patch","issue_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/issues/101","number":101,"state":"open","locked":false,"title":"Add ValidateFailException Test","user":{"login":"gundamew","id":2278214,"avatar_url":"https://avatars.githubusercontent.com/u/2278214?v=3","gravatar_id":"","url":"https://api.github.com/users/gundamew","html_url":"https://github.com/gundamew","followers_url":"https://api.github.com/users/gundamew/followers","following_url":"https://api.github.com/users/gundamew/following{/other_user}","gists_url":"https://api.github.com/users/gundamew/gists{/gist_id}","starred_url":"https://api.github.com/users/gundamew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gundamew/subscriptions","organizations_url":"https://api.github.com/users/gundamew/orgs","repos_url":"https://api.github.com/users/gundamew/repos","events_url":"https://api.github.com/users/gundamew/events{/privacy}","received_events_url":"https://api.github.com/users/gundamew/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-21T09:35:12Z","updated_at":"2015-07-21T11:36:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"756fd72d6f6e50c14508f41eda3f536b718cfc46","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/101/commits","review_comments_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/101/comments","review_comment_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/comments{/number}","comments_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/issues/101/comments","statuses_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/statuses/5a3c7265ca5359db8b045fcb57ba763ad6b8357a","head":{"label":"gundamew:88-validate-fail-exception-test-cases","ref":"88-validate-fail-exception-test-cases","sha":"5a3c7265ca5359db8b045fcb57ba763ad6b8357a","user":{"login":"gundamew","id":2278214,"avatar_url":"https://avatars.githubusercontent.com/u/2278214?v=3","gravatar_id":"","url":"https://api.github.com/users/gundamew","html_url":"https://github.com/gundamew","followers_url":"https://api.github.com/users/gundamew/followers","following_url":"https://api.github.com/users/gundamew/following{/other_user}","gists_url":"https://api.github.com/users/gundamew/gists{/gist_id}","starred_url":"https://api.github.com/users/gundamew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gundamew/subscriptions","organizations_url":"https://api.github.com/users/gundamew/orgs","repos_url":"https://api.github.com/users/gundamew/repos","events_url":"https://api.github.com/users/gundamew/events{/privacy}","received_events_url":"https://api.github.com/users/gundamew/received_events","type":"User","site_admin":false},"repo":{"id":32718817,"name":"windwalker-joomla-rad","full_name":"gundamew/windwalker-joomla-rad","owner":{"login":"gundamew","id":2278214,"avatar_url":"https://avatars.githubusercontent.com/u/2278214?v=3","gravatar_id":"","url":"https://api.github.com/users/gundamew","html_url":"https://github.com/gundamew","followers_url":"https://api.github.com/users/gundamew/followers","following_url":"https://api.github.com/users/gundamew/following{/other_user}","gists_url":"https://api.github.com/users/gundamew/gists{/gist_id}","starred_url":"https://api.github.com/users/gundamew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gundamew/subscriptions","organizations_url":"https://api.github.com/users/gundamew/orgs","repos_url":"https://api.github.com/users/gundamew/repos","events_url":"https://api.github.com/users/gundamew/events{/privacy}","received_events_url":"https://api.github.com/users/gundamew/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gundamew/windwalker-joomla-rad","description":"Windwalker RAD framework for Joomla CMS","fork":true,"url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad","forks_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/forks","keys_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/teams","hooks_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/hooks","issue_events_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/issues/events{/number}","events_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/events","assignees_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/assignees{/user}","branches_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/branches{/branch}","tags_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/tags","blobs_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/git/refs{/sha}","trees_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/statuses/{sha}","languages_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/languages","stargazers_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/stargazers","contributors_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/contributors","subscribers_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/subscribers","subscription_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/subscription","commits_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/commits{/sha}","git_commits_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/git/commits{/sha}","comments_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/comments{/number}","issue_comment_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/issues/comments{/number}","contents_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/contents/{+path}","compare_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/merges","archive_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/downloads","issues_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/issues{/number}","pulls_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/pulls{/number}","milestones_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/milestones{/number}","notifications_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/labels{/name}","releases_url":"https://api.github.com/repos/gundamew/windwalker-joomla-rad/releases{/id}","created_at":"2015-03-23T08:09:25Z","updated_at":"2015-04-01T03:32:00Z","pushed_at":"2015-07-21T10:25:40Z","git_url":"git://github.com/gundamew/windwalker-joomla-rad.git","ssh_url":"git@github.com:gundamew/windwalker-joomla-rad.git","clone_url":"https://github.com/gundamew/windwalker-joomla-rad.git","svn_url":"https://github.com/gundamew/windwalker-joomla-rad","homepage":"http://ventoviro.github.io/windwalker-rad-doc/","size":2664,"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":"dev-2.1"}},"base":{"label":"smstw:dev-2.1","ref":"dev-2.1","sha":"cdbe361a47746c1e776bf0e946efd4938d6b1d59","user":{"login":"smstw","id":5608018,"avatar_url":"https://avatars.githubusercontent.com/u/5608018?v=3","gravatar_id":"","url":"https://api.github.com/users/smstw","html_url":"https://github.com/smstw","followers_url":"https://api.github.com/users/smstw/followers","following_url":"https://api.github.com/users/smstw/following{/other_user}","gists_url":"https://api.github.com/users/smstw/gists{/gist_id}","starred_url":"https://api.github.com/users/smstw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smstw/subscriptions","organizations_url":"https://api.github.com/users/smstw/orgs","repos_url":"https://api.github.com/users/smstw/repos","events_url":"https://api.github.com/users/smstw/events{/privacy}","received_events_url":"https://api.github.com/users/smstw/received_events","type":"Organization","site_admin":false},"repo":{"id":24495433,"name":"windwalker-joomla-rad","full_name":"smstw/windwalker-joomla-rad","owner":{"login":"smstw","id":5608018,"avatar_url":"https://avatars.githubusercontent.com/u/5608018?v=3","gravatar_id":"","url":"https://api.github.com/users/smstw","html_url":"https://github.com/smstw","followers_url":"https://api.github.com/users/smstw/followers","following_url":"https://api.github.com/users/smstw/following{/other_user}","gists_url":"https://api.github.com/users/smstw/gists{/gist_id}","starred_url":"https://api.github.com/users/smstw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smstw/subscriptions","organizations_url":"https://api.github.com/users/smstw/orgs","repos_url":"https://api.github.com/users/smstw/repos","events_url":"https://api.github.com/users/smstw/events{/privacy}","received_events_url":"https://api.github.com/users/smstw/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/smstw/windwalker-joomla-rad","description":"Windwalker RAD framework for Joomla CMS","fork":true,"url":"https://api.github.com/repos/smstw/windwalker-joomla-rad","forks_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/forks","keys_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/teams","hooks_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/hooks","issue_events_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/issues/events{/number}","events_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/events","assignees_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/assignees{/user}","branches_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/branches{/branch}","tags_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/tags","blobs_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/git/refs{/sha}","trees_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/statuses/{sha}","languages_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/languages","stargazers_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/stargazers","contributors_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/contributors","subscribers_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/subscribers","subscription_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/subscription","commits_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/commits{/sha}","git_commits_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/git/commits{/sha}","comments_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/comments{/number}","issue_comment_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/issues/comments{/number}","contents_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/contents/{+path}","compare_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/merges","archive_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/downloads","issues_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/issues{/number}","pulls_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls{/number}","milestones_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/milestones{/number}","notifications_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/labels{/name}","releases_url":"https://api.github.com/repos/smstw/windwalker-joomla-rad/releases{/id}","created_at":"2014-09-26T10:20:58Z","updated_at":"2015-06-16T14:22:35Z","pushed_at":"2015-07-21T10:25:40Z","git_url":"git://github.com/smstw/windwalker-joomla-rad.git","ssh_url":"git@github.com:smstw/windwalker-joomla-rad.git","clone_url":"https://github.com/smstw/windwalker-joomla-rad.git","svn_url":"https://github.com/smstw/windwalker-joomla-rad","homepage":"http://ventoviro.github.io/windwalker-rad-doc/","size":3199,"stargazers_count":1,"watchers_count":1,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":51,"forks":3,"open_issues":51,"watchers":1,"default_branch":"dev-2.1"}},"_links":{"self":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/101"},"html":{"href":"https://github.com/smstw/windwalker-joomla-rad/pull/101"},"issue":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/issues/101"},"comments":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/issues/101/comments"},"review_comments":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/101/comments"},"review_comment":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/pulls/101/commits"},"statuses":{"href":"https://api.github.com/repos/smstw/windwalker-joomla-rad/statuses/5a3c7265ca5359db8b045fcb57ba763ad6b8357a"}}}}