{"action":"created","comment":{"url":"https://api.github.com/repos/Codeception/Codeception/pulls/comments/90901296","pull_request_review_id":11413738,"id":90901296,"diff_hunk":"@@ -1013,20 +1013,45 @@ public function grabRecord($table, $attributes = [])\n     }\n \n     /**\n+     * Checks that number of given records were found in database.\n+     * You can pass the name of a database table or the class name of an Eloquent model as the first argument.\n+     *\n+     * ``` php\n+     * <?php\n+     * $I->seeNumRecords(1, 'users', array('name' => 'davert'));\n+     * $I->seeNumRecords(1, 'App\\User', array('name' => 'davert'));\n+     * ?>\n+     * ```\n+     *\n+     * @param integer $expectedNum\n+     * @param string $table\n+     * @param array $attributes\n+     * @part orm\n+     */\n+    public function seeNumRecords($expectedNum, $table, $attributes = [])\n+    {\n+        if (class_exists($table)) {\n+            $currentNum = $this->countModels($table, $attributes);\n+            if ($currentNum != $expectedNum) {\n+                $this->fail(\"The number of found $table ($currentNum) does not match expected number $expectedNum in with \" . json_encode($attributes));\n+            }\n+        } else {\n+            $currentNum = $this->countRecords($table, $attributes);\n+            if ($currentNum != $expectedNum) {\n+                $this->fail(\"The number of found records ($currentNum) do not match expected number $expectedNum in table $table with \" . json_encode($attributes));","path":"src/Codeception/Module/Laravel5.php","position":29,"original_position":29,"commit_id":"61798d1edadcb36b92aee2d714a826c8e72cf862","original_commit_id":"61798d1edadcb36b92aee2d714a826c8e72cf862","user":{"login":"janhenkgerritsen","id":1123080,"avatar_url":"https://avatars.githubusercontent.com/u/1123080?v=3","gravatar_id":"","url":"https://api.github.com/users/janhenkgerritsen","html_url":"https://github.com/janhenkgerritsen","followers_url":"https://api.github.com/users/janhenkgerritsen/followers","following_url":"https://api.github.com/users/janhenkgerritsen/following{/other_user}","gists_url":"https://api.github.com/users/janhenkgerritsen/gists{/gist_id}","starred_url":"https://api.github.com/users/janhenkgerritsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/janhenkgerritsen/subscriptions","organizations_url":"https://api.github.com/users/janhenkgerritsen/orgs","repos_url":"https://api.github.com/users/janhenkgerritsen/repos","events_url":"https://api.github.com/users/janhenkgerritsen/events{/privacy}","received_events_url":"https://api.github.com/users/janhenkgerritsen/received_events","type":"User","site_admin":false},"body":"Change \"do not match\" to \"does not match\" in error message.","created_at":"2016-12-05T16:31:19Z","updated_at":"2016-12-05T16:36:40Z","html_url":"https://github.com/Codeception/Codeception/pull/3816#discussion_r90901296","pull_request_url":"https://api.github.com/repos/Codeception/Codeception/pulls/3816","_links":{"self":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/comments/90901296"},"html":{"href":"https://github.com/Codeception/Codeception/pull/3816#discussion_r90901296"},"pull_request":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/3816"}}},"pull_request":{"url":"https://api.github.com/repos/Codeception/Codeception/pulls/3816","id":96529156,"html_url":"https://github.com/Codeception/Codeception/pull/3816","diff_url":"https://github.com/Codeception/Codeception/pull/3816.diff","patch_url":"https://github.com/Codeception/Codeception/pull/3816.patch","issue_url":"https://api.github.com/repos/Codeception/Codeception/issues/3816","number":3816,"state":"open","locked":false,"title":"Added seeNumRecords to Laravel5 module","user":{"login":"dmoreno","id":66183,"avatar_url":"https://avatars.githubusercontent.com/u/66183?v=3","gravatar_id":"","url":"https://api.github.com/users/dmoreno","html_url":"https://github.com/dmoreno","followers_url":"https://api.github.com/users/dmoreno/followers","following_url":"https://api.github.com/users/dmoreno/following{/other_user}","gists_url":"https://api.github.com/users/dmoreno/gists{/gist_id}","starred_url":"https://api.github.com/users/dmoreno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmoreno/subscriptions","organizations_url":"https://api.github.com/users/dmoreno/orgs","repos_url":"https://api.github.com/users/dmoreno/repos","events_url":"https://api.github.com/users/dmoreno/events{/privacy}","received_events_url":"https://api.github.com/users/dmoreno/received_events","type":"User","site_admin":false},"body":"This is equivalent to seeNumRecords in DB module","created_at":"2016-12-05T13:32:54Z","updated_at":"2016-12-05T16:36:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f56cfa524bed0c362e5b41360d1c68b41d55ac09","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Codeception/Codeception/pulls/3816/commits","review_comments_url":"https://api.github.com/repos/Codeception/Codeception/pulls/3816/comments","review_comment_url":"https://api.github.com/repos/Codeception/Codeception/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Codeception/Codeception/issues/3816/comments","statuses_url":"https://api.github.com/repos/Codeception/Codeception/statuses/61798d1edadcb36b92aee2d714a826c8e72cf862","head":{"label":"dmoreno:feature/laravel5-seeNumRecords","ref":"feature/laravel5-seeNumRecords","sha":"61798d1edadcb36b92aee2d714a826c8e72cf862","user":{"login":"dmoreno","id":66183,"avatar_url":"https://avatars.githubusercontent.com/u/66183?v=3","gravatar_id":"","url":"https://api.github.com/users/dmoreno","html_url":"https://github.com/dmoreno","followers_url":"https://api.github.com/users/dmoreno/followers","following_url":"https://api.github.com/users/dmoreno/following{/other_user}","gists_url":"https://api.github.com/users/dmoreno/gists{/gist_id}","starred_url":"https://api.github.com/users/dmoreno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmoreno/subscriptions","organizations_url":"https://api.github.com/users/dmoreno/orgs","repos_url":"https://api.github.com/users/dmoreno/repos","events_url":"https://api.github.com/users/dmoreno/events{/privacy}","received_events_url":"https://api.github.com/users/dmoreno/received_events","type":"User","site_admin":false},"repo":{"id":75626195,"name":"Codeception","full_name":"dmoreno/Codeception","owner":{"login":"dmoreno","id":66183,"avatar_url":"https://avatars.githubusercontent.com/u/66183?v=3","gravatar_id":"","url":"https://api.github.com/users/dmoreno","html_url":"https://github.com/dmoreno","followers_url":"https://api.github.com/users/dmoreno/followers","following_url":"https://api.github.com/users/dmoreno/following{/other_user}","gists_url":"https://api.github.com/users/dmoreno/gists{/gist_id}","starred_url":"https://api.github.com/users/dmoreno/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dmoreno/subscriptions","organizations_url":"https://api.github.com/users/dmoreno/orgs","repos_url":"https://api.github.com/users/dmoreno/repos","events_url":"https://api.github.com/users/dmoreno/events{/privacy}","received_events_url":"https://api.github.com/users/dmoreno/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dmoreno/Codeception","description":"Full-stack testing PHP framework","fork":true,"url":"https://api.github.com/repos/dmoreno/Codeception","forks_url":"https://api.github.com/repos/dmoreno/Codeception/forks","keys_url":"https://api.github.com/repos/dmoreno/Codeception/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dmoreno/Codeception/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dmoreno/Codeception/teams","hooks_url":"https://api.github.com/repos/dmoreno/Codeception/hooks","issue_events_url":"https://api.github.com/repos/dmoreno/Codeception/issues/events{/number}","events_url":"https://api.github.com/repos/dmoreno/Codeception/events","assignees_url":"https://api.github.com/repos/dmoreno/Codeception/assignees{/user}","branches_url":"https://api.github.com/repos/dmoreno/Codeception/branches{/branch}","tags_url":"https://api.github.com/repos/dmoreno/Codeception/tags","blobs_url":"https://api.github.com/repos/dmoreno/Codeception/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dmoreno/Codeception/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dmoreno/Codeception/git/refs{/sha}","trees_url":"https://api.github.com/repos/dmoreno/Codeception/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dmoreno/Codeception/statuses/{sha}","languages_url":"https://api.github.com/repos/dmoreno/Codeception/languages","stargazers_url":"https://api.github.com/repos/dmoreno/Codeception/stargazers","contributors_url":"https://api.github.com/repos/dmoreno/Codeception/contributors","subscribers_url":"https://api.github.com/repos/dmoreno/Codeception/subscribers","subscription_url":"https://api.github.com/repos/dmoreno/Codeception/subscription","commits_url":"https://api.github.com/repos/dmoreno/Codeception/commits{/sha}","git_commits_url":"https://api.github.com/repos/dmoreno/Codeception/git/commits{/sha}","comments_url":"https://api.github.com/repos/dmoreno/Codeception/comments{/number}","issue_comment_url":"https://api.github.com/repos/dmoreno/Codeception/issues/comments{/number}","contents_url":"https://api.github.com/repos/dmoreno/Codeception/contents/{+path}","compare_url":"https://api.github.com/repos/dmoreno/Codeception/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dmoreno/Codeception/merges","archive_url":"https://api.github.com/repos/dmoreno/Codeception/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dmoreno/Codeception/downloads","issues_url":"https://api.github.com/repos/dmoreno/Codeception/issues{/number}","pulls_url":"https://api.github.com/repos/dmoreno/Codeception/pulls{/number}","milestones_url":"https://api.github.com/repos/dmoreno/Codeception/milestones{/number}","notifications_url":"https://api.github.com/repos/dmoreno/Codeception/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dmoreno/Codeception/labels{/name}","releases_url":"https://api.github.com/repos/dmoreno/Codeception/releases{/id}","deployments_url":"https://api.github.com/repos/dmoreno/Codeception/deployments","created_at":"2016-12-05T13:15:36Z","updated_at":"2016-12-05T13:15:39Z","pushed_at":"2016-12-05T13:32:17Z","git_url":"git://github.com/dmoreno/Codeception.git","ssh_url":"git@github.com:dmoreno/Codeception.git","clone_url":"https://github.com/dmoreno/Codeception.git","svn_url":"https://github.com/dmoreno/Codeception","homepage":"http://codeception.com","size":67379,"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":"2.2"}},"base":{"label":"Codeception:2.2","ref":"2.2","sha":"86770e89d266557c20dd0b1de5390e706f4770c1","user":{"login":"Codeception","id":1288753,"avatar_url":"https://avatars.githubusercontent.com/u/1288753?v=3","gravatar_id":"","url":"https://api.github.com/users/Codeception","html_url":"https://github.com/Codeception","followers_url":"https://api.github.com/users/Codeception/followers","following_url":"https://api.github.com/users/Codeception/following{/other_user}","gists_url":"https://api.github.com/users/Codeception/gists{/gist_id}","starred_url":"https://api.github.com/users/Codeception/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Codeception/subscriptions","organizations_url":"https://api.github.com/users/Codeception/orgs","repos_url":"https://api.github.com/users/Codeception/repos","events_url":"https://api.github.com/users/Codeception/events{/privacy}","received_events_url":"https://api.github.com/users/Codeception/received_events","type":"Organization","site_admin":false},"repo":{"id":2880469,"name":"Codeception","full_name":"Codeception/Codeception","owner":{"login":"Codeception","id":1288753,"avatar_url":"https://avatars.githubusercontent.com/u/1288753?v=3","gravatar_id":"","url":"https://api.github.com/users/Codeception","html_url":"https://github.com/Codeception","followers_url":"https://api.github.com/users/Codeception/followers","following_url":"https://api.github.com/users/Codeception/following{/other_user}","gists_url":"https://api.github.com/users/Codeception/gists{/gist_id}","starred_url":"https://api.github.com/users/Codeception/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Codeception/subscriptions","organizations_url":"https://api.github.com/users/Codeception/orgs","repos_url":"https://api.github.com/users/Codeception/repos","events_url":"https://api.github.com/users/Codeception/events{/privacy}","received_events_url":"https://api.github.com/users/Codeception/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Codeception/Codeception","description":"Full-stack testing PHP framework","fork":false,"url":"https://api.github.com/repos/Codeception/Codeception","forks_url":"https://api.github.com/repos/Codeception/Codeception/forks","keys_url":"https://api.github.com/repos/Codeception/Codeception/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Codeception/Codeception/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Codeception/Codeception/teams","hooks_url":"https://api.github.com/repos/Codeception/Codeception/hooks","issue_events_url":"https://api.github.com/repos/Codeception/Codeception/issues/events{/number}","events_url":"https://api.github.com/repos/Codeception/Codeception/events","assignees_url":"https://api.github.com/repos/Codeception/Codeception/assignees{/user}","branches_url":"https://api.github.com/repos/Codeception/Codeception/branches{/branch}","tags_url":"https://api.github.com/repos/Codeception/Codeception/tags","blobs_url":"https://api.github.com/repos/Codeception/Codeception/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Codeception/Codeception/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Codeception/Codeception/git/refs{/sha}","trees_url":"https://api.github.com/repos/Codeception/Codeception/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Codeception/Codeception/statuses/{sha}","languages_url":"https://api.github.com/repos/Codeception/Codeception/languages","stargazers_url":"https://api.github.com/repos/Codeception/Codeception/stargazers","contributors_url":"https://api.github.com/repos/Codeception/Codeception/contributors","subscribers_url":"https://api.github.com/repos/Codeception/Codeception/subscribers","subscription_url":"https://api.github.com/repos/Codeception/Codeception/subscription","commits_url":"https://api.github.com/repos/Codeception/Codeception/commits{/sha}","git_commits_url":"https://api.github.com/repos/Codeception/Codeception/git/commits{/sha}","comments_url":"https://api.github.com/repos/Codeception/Codeception/comments{/number}","issue_comment_url":"https://api.github.com/repos/Codeception/Codeception/issues/comments{/number}","contents_url":"https://api.github.com/repos/Codeception/Codeception/contents/{+path}","compare_url":"https://api.github.com/repos/Codeception/Codeception/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Codeception/Codeception/merges","archive_url":"https://api.github.com/repos/Codeception/Codeception/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Codeception/Codeception/downloads","issues_url":"https://api.github.com/repos/Codeception/Codeception/issues{/number}","pulls_url":"https://api.github.com/repos/Codeception/Codeception/pulls{/number}","milestones_url":"https://api.github.com/repos/Codeception/Codeception/milestones{/number}","notifications_url":"https://api.github.com/repos/Codeception/Codeception/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Codeception/Codeception/labels{/name}","releases_url":"https://api.github.com/repos/Codeception/Codeception/releases{/id}","deployments_url":"https://api.github.com/repos/Codeception/Codeception/deployments","created_at":"2011-11-30T04:06:44Z","updated_at":"2016-12-05T14:02:36Z","pushed_at":"2016-12-05T13:32:54Z","git_url":"git://github.com/Codeception/Codeception.git","ssh_url":"git@github.com:Codeception/Codeception.git","clone_url":"https://github.com/Codeception/Codeception.git","svn_url":"https://github.com/Codeception/Codeception","homepage":"http://codeception.com","size":77916,"stargazers_count":2501,"watchers_count":2501,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":934,"mirror_url":null,"open_issues_count":234,"forks":934,"open_issues":234,"watchers":2501,"default_branch":"2.2"}},"_links":{"self":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/3816"},"html":{"href":"https://github.com/Codeception/Codeception/pull/3816"},"issue":{"href":"https://api.github.com/repos/Codeception/Codeception/issues/3816"},"comments":{"href":"https://api.github.com/repos/Codeception/Codeception/issues/3816/comments"},"review_comments":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/3816/comments"},"review_comment":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Codeception/Codeception/pulls/3816/commits"},"statuses":{"href":"https://api.github.com/repos/Codeception/Codeception/statuses/61798d1edadcb36b92aee2d714a826c8e72cf862"}}}}
{"actor":{"display_login":"janhenkgerritsen"}}