{"action":"created","comment":{"url":"https://api.github.com/repos/zendframework/zend-validator/pulls/comments/35209413","id":35209413,"diff_hunk":"@@ -152,9 +152,38 @@ public function testPassingNullWhenSettingPluginManagerResetsPluginManager()\n         $this->assertNotSame($plugins, StaticValidator::getPluginManager());\n     }\n \n-    public function testExecuteValidWithParameters()\n+    public function parameterizedData()\n     {\n-        $this->assertTrue(StaticValidator::execute(5, 'Between', [1, 10]));\n-        $this->assertTrue(StaticValidator::execute(5, 'Between', ['min' => 1, 'max' => 10]));\n+        return [\n+            'valid-positive-range'   => [5, 'Between', ['min' => 1, 'max' => 10], 'assertTrue'],\n+            'valid-negative-range'   => [-5, 'Between', ['min' => -10, 'max' => -1], 'assertTrue'],\n+            'invalid-positive-range' => [-5, 'Between', ['min' => 1, 'max' => 10], 'assertFalse'],\n+            'invalid-negative-range' => [5, 'Between', ['min' => -10, 'max' => -1], 'assertFalse'],\n+        ];\n+    }\n+\n+    /**\n+     * @dataProvider parameterizedData\n+     */\n+    public function testExecuteValidWithParameters($value, $validator, $options, $assertion)\n+    {\n+        $this->$assertion(StaticValidator::execute($value, $validator, $options));","path":"test/StaticValidatorTest.php","position":null,"original_position":22,"commit_id":"763ed81b7b2b5085bce162e4bd78f0357f3fe0c3","original_commit_id":"79e8c96db9190090bc4a9debc2bac614957245ee","user":{"login":"Maks3w","id":1301698,"avatar_url":"https://avatars.githubusercontent.com/u/1301698?v=3","gravatar_id":"","url":"https://api.github.com/users/Maks3w","html_url":"https://github.com/Maks3w","followers_url":"https://api.github.com/users/Maks3w/followers","following_url":"https://api.github.com/users/Maks3w/following{/other_user}","gists_url":"https://api.github.com/users/Maks3w/gists{/gist_id}","starred_url":"https://api.github.com/users/Maks3w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Maks3w/subscriptions","organizations_url":"https://api.github.com/users/Maks3w/orgs","repos_url":"https://api.github.com/users/Maks3w/repos","events_url":"https://api.github.com/users/Maks3w/events{/privacy}","received_events_url":"https://api.github.com/users/Maks3w/received_events","type":"User","site_admin":false},"body":"The problem with assersame is anyone can put a string in the provider.\r\n\r\nSplit in two make more clear 1:1 relations with method signature and avoid put false positive values in provider. \r\n\r\nThis is motivated in cases where the provider is implemented in child classes while the test method is not\r\n\r\n","created_at":"2015-07-22T13:01:28Z","updated_at":"2015-07-22T13:01:28Z","html_url":"https://github.com/zendframework/zend-validator/pull/26#discussion_r35209413","pull_request_url":"https://api.github.com/repos/zendframework/zend-validator/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/zendframework/zend-validator/pulls/comments/35209413"},"html":{"href":"https://github.com/zendframework/zend-validator/pull/26#discussion_r35209413"},"pull_request":{"href":"https://api.github.com/repos/zendframework/zend-validator/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/zendframework/zend-validator/pulls/26","id":40488857,"html_url":"https://github.com/zendframework/zend-validator/pull/26","diff_url":"https://github.com/zendframework/zend-validator/pull/26.diff","patch_url":"https://github.com/zendframework/zend-validator/pull/26.patch","issue_url":"https://api.github.com/repos/zendframework/zend-validator/issues/26","number":26,"state":"open","locked":false,"title":"Fix StaticValidator::execute tests and behavior","user":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"body":"This is an attempt to address #16.\n\nPreviously, the tests were incorrectly passing a non-associative array of options to `execute()`, which implied that they would be passed as constructor arguments, which was not the case. In this particular case, there was a false positive, as the value being validated was valid for the default values present in the instance.\n\nThis patch removes that assertion, and splits the test into two, one for validating properly formed calls to the method with options as an associative array, and one for calling it with non-associative options. In the second, the test asserts that an `InvalidArgumentException` is expected.\n\nThe patch is a potential BC break. However, passing a non-associative array of arguments had unexpected behavior previously, and relying on that behavior would result in application bugs. The change to raise an exception ensures consistent behavior.","created_at":"2015-07-21T18:27:13Z","updated_at":"2015-07-22T13:01:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c508ab4a94ae9fc35e1934aa01d571909ffa3cfb","assignee":null,"milestone":{"url":"https://api.github.com/repos/zendframework/zend-validator/milestones/6","html_url":"https://github.com/zendframework/zend-validator/milestones/2.5.3","labels_url":"https://api.github.com/repos/zendframework/zend-validator/milestones/6/labels","id":1218742,"number":6,"title":"2.5.3","description":null,"creator":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":1,"state":"open","created_at":"2015-07-21T18:27:46Z","updated_at":"2015-07-22T08:46:26Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/zendframework/zend-validator/pulls/26/commits","review_comments_url":"https://api.github.com/repos/zendframework/zend-validator/pulls/26/comments","review_comment_url":"https://api.github.com/repos/zendframework/zend-validator/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zendframework/zend-validator/issues/26/comments","statuses_url":"https://api.github.com/repos/zendframework/zend-validator/statuses/763ed81b7b2b5085bce162e4bd78f0357f3fe0c3","head":{"label":"weierophinney:hotfix/16","ref":"hotfix/16","sha":"763ed81b7b2b5085bce162e4bd78f0357f3fe0c3","user":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"repo":{"id":36394581,"name":"zend-validator","full_name":"weierophinney/zend-validator","owner":{"login":"weierophinney","id":25943,"avatar_url":"https://avatars.githubusercontent.com/u/25943?v=3","gravatar_id":"","url":"https://api.github.com/users/weierophinney","html_url":"https://github.com/weierophinney","followers_url":"https://api.github.com/users/weierophinney/followers","following_url":"https://api.github.com/users/weierophinney/following{/other_user}","gists_url":"https://api.github.com/users/weierophinney/gists{/gist_id}","starred_url":"https://api.github.com/users/weierophinney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/weierophinney/subscriptions","organizations_url":"https://api.github.com/users/weierophinney/orgs","repos_url":"https://api.github.com/users/weierophinney/repos","events_url":"https://api.github.com/users/weierophinney/events{/privacy}","received_events_url":"https://api.github.com/users/weierophinney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/weierophinney/zend-validator","description":"Validator component from Zend Framework","fork":true,"url":"https://api.github.com/repos/weierophinney/zend-validator","forks_url":"https://api.github.com/repos/weierophinney/zend-validator/forks","keys_url":"https://api.github.com/repos/weierophinney/zend-validator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/weierophinney/zend-validator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/weierophinney/zend-validator/teams","hooks_url":"https://api.github.com/repos/weierophinney/zend-validator/hooks","issue_events_url":"https://api.github.com/repos/weierophinney/zend-validator/issues/events{/number}","events_url":"https://api.github.com/repos/weierophinney/zend-validator/events","assignees_url":"https://api.github.com/repos/weierophinney/zend-validator/assignees{/user}","branches_url":"https://api.github.com/repos/weierophinney/zend-validator/branches{/branch}","tags_url":"https://api.github.com/repos/weierophinney/zend-validator/tags","blobs_url":"https://api.github.com/repos/weierophinney/zend-validator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/weierophinney/zend-validator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/weierophinney/zend-validator/git/refs{/sha}","trees_url":"https://api.github.com/repos/weierophinney/zend-validator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/weierophinney/zend-validator/statuses/{sha}","languages_url":"https://api.github.com/repos/weierophinney/zend-validator/languages","stargazers_url":"https://api.github.com/repos/weierophinney/zend-validator/stargazers","contributors_url":"https://api.github.com/repos/weierophinney/zend-validator/contributors","subscribers_url":"https://api.github.com/repos/weierophinney/zend-validator/subscribers","subscription_url":"https://api.github.com/repos/weierophinney/zend-validator/subscription","commits_url":"https://api.github.com/repos/weierophinney/zend-validator/commits{/sha}","git_commits_url":"https://api.github.com/repos/weierophinney/zend-validator/git/commits{/sha}","comments_url":"https://api.github.com/repos/weierophinney/zend-validator/comments{/number}","issue_comment_url":"https://api.github.com/repos/weierophinney/zend-validator/issues/comments{/number}","contents_url":"https://api.github.com/repos/weierophinney/zend-validator/contents/{+path}","compare_url":"https://api.github.com/repos/weierophinney/zend-validator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/weierophinney/zend-validator/merges","archive_url":"https://api.github.com/repos/weierophinney/zend-validator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/weierophinney/zend-validator/downloads","issues_url":"https://api.github.com/repos/weierophinney/zend-validator/issues{/number}","pulls_url":"https://api.github.com/repos/weierophinney/zend-validator/pulls{/number}","milestones_url":"https://api.github.com/repos/weierophinney/zend-validator/milestones{/number}","notifications_url":"https://api.github.com/repos/weierophinney/zend-validator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/weierophinney/zend-validator/labels{/name}","releases_url":"https://api.github.com/repos/weierophinney/zend-validator/releases{/id}","created_at":"2015-05-27T20:41:54Z","updated_at":"2015-05-27T20:41:55Z","pushed_at":"2015-07-22T12:56:47Z","git_url":"git://github.com/weierophinney/zend-validator.git","ssh_url":"git@github.com:weierophinney/zend-validator.git","clone_url":"https://github.com/weierophinney/zend-validator.git","svn_url":"https://github.com/weierophinney/zend-validator","homepage":"https://github.com/zendframework/zf2","size":3663,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"zendframework:master","ref":"master","sha":"b01e5f4c6a80769b75724cf4a1028999ea786702","user":{"login":"zendframework","id":296074,"avatar_url":"https://avatars.githubusercontent.com/u/296074?v=3","gravatar_id":"","url":"https://api.github.com/users/zendframework","html_url":"https://github.com/zendframework","followers_url":"https://api.github.com/users/zendframework/followers","following_url":"https://api.github.com/users/zendframework/following{/other_user}","gists_url":"https://api.github.com/users/zendframework/gists{/gist_id}","starred_url":"https://api.github.com/users/zendframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendframework/subscriptions","organizations_url":"https://api.github.com/users/zendframework/orgs","repos_url":"https://api.github.com/users/zendframework/repos","events_url":"https://api.github.com/users/zendframework/events{/privacy}","received_events_url":"https://api.github.com/users/zendframework/received_events","type":"Organization","site_admin":false},"repo":{"id":35280836,"name":"zend-validator","full_name":"zendframework/zend-validator","owner":{"login":"zendframework","id":296074,"avatar_url":"https://avatars.githubusercontent.com/u/296074?v=3","gravatar_id":"","url":"https://api.github.com/users/zendframework","html_url":"https://github.com/zendframework","followers_url":"https://api.github.com/users/zendframework/followers","following_url":"https://api.github.com/users/zendframework/following{/other_user}","gists_url":"https://api.github.com/users/zendframework/gists{/gist_id}","starred_url":"https://api.github.com/users/zendframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zendframework/subscriptions","organizations_url":"https://api.github.com/users/zendframework/orgs","repos_url":"https://api.github.com/users/zendframework/repos","events_url":"https://api.github.com/users/zendframework/events{/privacy}","received_events_url":"https://api.github.com/users/zendframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zendframework/zend-validator","description":"Validator component from Zend Framework","fork":false,"url":"https://api.github.com/repos/zendframework/zend-validator","forks_url":"https://api.github.com/repos/zendframework/zend-validator/forks","keys_url":"https://api.github.com/repos/zendframework/zend-validator/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zendframework/zend-validator/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zendframework/zend-validator/teams","hooks_url":"https://api.github.com/repos/zendframework/zend-validator/hooks","issue_events_url":"https://api.github.com/repos/zendframework/zend-validator/issues/events{/number}","events_url":"https://api.github.com/repos/zendframework/zend-validator/events","assignees_url":"https://api.github.com/repos/zendframework/zend-validator/assignees{/user}","branches_url":"https://api.github.com/repos/zendframework/zend-validator/branches{/branch}","tags_url":"https://api.github.com/repos/zendframework/zend-validator/tags","blobs_url":"https://api.github.com/repos/zendframework/zend-validator/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zendframework/zend-validator/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zendframework/zend-validator/git/refs{/sha}","trees_url":"https://api.github.com/repos/zendframework/zend-validator/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zendframework/zend-validator/statuses/{sha}","languages_url":"https://api.github.com/repos/zendframework/zend-validator/languages","stargazers_url":"https://api.github.com/repos/zendframework/zend-validator/stargazers","contributors_url":"https://api.github.com/repos/zendframework/zend-validator/contributors","subscribers_url":"https://api.github.com/repos/zendframework/zend-validator/subscribers","subscription_url":"https://api.github.com/repos/zendframework/zend-validator/subscription","commits_url":"https://api.github.com/repos/zendframework/zend-validator/commits{/sha}","git_commits_url":"https://api.github.com/repos/zendframework/zend-validator/git/commits{/sha}","comments_url":"https://api.github.com/repos/zendframework/zend-validator/comments{/number}","issue_comment_url":"https://api.github.com/repos/zendframework/zend-validator/issues/comments{/number}","contents_url":"https://api.github.com/repos/zendframework/zend-validator/contents/{+path}","compare_url":"https://api.github.com/repos/zendframework/zend-validator/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zendframework/zend-validator/merges","archive_url":"https://api.github.com/repos/zendframework/zend-validator/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zendframework/zend-validator/downloads","issues_url":"https://api.github.com/repos/zendframework/zend-validator/issues{/number}","pulls_url":"https://api.github.com/repos/zendframework/zend-validator/pulls{/number}","milestones_url":"https://api.github.com/repos/zendframework/zend-validator/milestones{/number}","notifications_url":"https://api.github.com/repos/zendframework/zend-validator/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zendframework/zend-validator/labels{/name}","releases_url":"https://api.github.com/repos/zendframework/zend-validator/releases{/id}","created_at":"2015-05-08T13:28:15Z","updated_at":"2015-07-02T06:54:41Z","pushed_at":"2015-07-22T12:56:49Z","git_url":"git://github.com/zendframework/zend-validator.git","ssh_url":"git@github.com:zendframework/zend-validator.git","clone_url":"https://github.com/zendframework/zend-validator.git","svn_url":"https://github.com/zendframework/zend-validator","homepage":"https://github.com/zendframework/zf2","size":4281,"stargazers_count":5,"watchers_count":5,"language":"PHP","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":16,"mirror_url":null,"open_issues_count":10,"forks":16,"open_issues":10,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zendframework/zend-validator/pulls/26"},"html":{"href":"https://github.com/zendframework/zend-validator/pull/26"},"issue":{"href":"https://api.github.com/repos/zendframework/zend-validator/issues/26"},"comments":{"href":"https://api.github.com/repos/zendframework/zend-validator/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/zendframework/zend-validator/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/zendframework/zend-validator/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zendframework/zend-validator/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/zendframework/zend-validator/statuses/763ed81b7b2b5085bce162e4bd78f0357f3fe0c3"}}}}