{"action":"created","comment":{"url":"https://api.github.com/repos/silinternational/idp-id-broker/pulls/comments/158138908","pull_request_review_id":84901071,"id":158138908,"diff_hunk":"@@ -228,6 +231,52 @@ public function thatUserDoesNotHaveAPassword()\n         }\n     }\n \n+    /**\n+     * @Given a :messageType email was sent :daysAgo days ago to that user\n+     */\n+    public function anEmailWasSentXDaysAgoToThatUser(string $messageType, int $daysAgo)\n+    {\n+        if ($daysAgo < 0) {\n+            return;\n+        }\n+\n+        $emailLog = new EmailLog([\n+            'user_id' => $this->tempUser->id,\n+            'message_type' => $messageType,\n+        ]);\n+\n+        if ($daysAgo > 0) {\n+            $diffConfig = \"-\" . $daysAgo . \" days\";\n+            $dbDate = MySqlDateTime::relative($diffConfig);\n+\n+            $emailLog->sent_utc = $dbDate;\n+        }\n+        echo PHP_EOL . \"Date: \" . $emailLog->sent_utc;\n+        $emailLog->save();\n+    }\n+\n+    /**\n+     * @Given a :messageType email has been sent to that user\n+     */\n+    public function anEmailHasBeenSentToThatUser(string $messageType)\n+    {\n+\n+        $emailLog = new EmailLog([\n+            'user_id' => $this->tempUser->id,\n+            'message_type' => $messageType,\n+        ]);\n+\n+        $emailLog->save();\n+    }\n+\n+    /**\n+     * @Given a :messageType email has NOT been sent to that user\n+     */\n+    public function anEmailHasNotBeenSentToThatUser(string $messageType)\n+    {\n+        return;","path":"application/features/bootstrap/EmailContext.php","position":138,"original_position":57,"commit_id":"b7b7a4a9c9198e386556c24852041dff95dd1bd8","original_commit_id":"b7b7a4a9c9198e386556c24852041dff95dd1bd8","user":{"login":"forevermatt","id":6233204,"avatar_url":"https://avatars2.githubusercontent.com/u/6233204?v=4","gravatar_id":"","url":"https://api.github.com/users/forevermatt","html_url":"https://github.com/forevermatt","followers_url":"https://api.github.com/users/forevermatt/followers","following_url":"https://api.github.com/users/forevermatt/following{/other_user}","gists_url":"https://api.github.com/users/forevermatt/gists{/gist_id}","starred_url":"https://api.github.com/users/forevermatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/forevermatt/subscriptions","organizations_url":"https://api.github.com/users/forevermatt/orgs","repos_url":"https://api.github.com/users/forevermatt/repos","events_url":"https://api.github.com/users/forevermatt/events{/privacy}","received_events_url":"https://api.github.com/users/forevermatt/received_events","type":"User","site_admin":false},"body":"Looks like the body of this function was never written. I think all that it would need to do is delete any emails of that type that were sent to that user.","created_at":"2017-12-20T21:21:32Z","updated_at":"2017-12-20T21:21:32Z","html_url":"https://github.com/silinternational/idp-id-broker/pull/115#discussion_r158138908","pull_request_url":"https://api.github.com/repos/silinternational/idp-id-broker/pulls/115","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/silinternational/idp-id-broker/pulls/comments/158138908"},"html":{"href":"https://github.com/silinternational/idp-id-broker/pull/115#discussion_r158138908"},"pull_request":{"href":"https://api.github.com/repos/silinternational/idp-id-broker/pulls/115"}}},"pull_request":{"url":"https://api.github.com/repos/silinternational/idp-id-broker/pulls/115","id":158695049,"html_url":"https://github.com/silinternational/idp-id-broker/pull/115","diff_url":"https://github.com/silinternational/idp-id-broker/pull/115.diff","patch_url":"https://github.com/silinternational/idp-id-broker/pull/115.patch","issue_url":"https://api.github.com/repos/silinternational/idp-id-broker/issues/115","number":115,"state":"open","locked":false,"title":"Feature/more email types","user":{"login":"Baggerone","id":8058522,"avatar_url":"https://avatars0.githubusercontent.com/u/8058522?v=4","gravatar_id":"","url":"https://api.github.com/users/Baggerone","html_url":"https://github.com/Baggerone","followers_url":"https://api.github.com/users/Baggerone/followers","following_url":"https://api.github.com/users/Baggerone/following{/other_user}","gists_url":"https://api.github.com/users/Baggerone/gists{/gist_id}","starred_url":"https://api.github.com/users/Baggerone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Baggerone/subscriptions","organizations_url":"https://api.github.com/users/Baggerone/orgs","repos_url":"https://api.github.com/users/Baggerone/repos","events_url":"https://api.github.com/users/Baggerone/events{/privacy}","received_events_url":"https://api.github.com/users/Baggerone/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-12-15T21:14:07Z","updated_at":"2017-12-20T21:21:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1b49e03ac629a58148d8bc3ee459422f88753b0f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"fillup","id":556105,"avatar_url":"https://avatars3.githubusercontent.com/u/556105?v=4","gravatar_id":"","url":"https://api.github.com/users/fillup","html_url":"https://github.com/fillup","followers_url":"https://api.github.com/users/fillup/followers","following_url":"https://api.github.com/users/fillup/following{/other_user}","gists_url":"https://api.github.com/users/fillup/gists{/gist_id}","starred_url":"https://api.github.com/users/fillup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fillup/subscriptions","organizations_url":"https://api.github.com/users/fillup/orgs","repos_url":"https://api.github.com/users/fillup/repos","events_url":"https://api.github.com/users/fillup/events{/privacy}","received_events_url":"https://api.github.com/users/fillup/received_events","type":"User","site_admin":false},{"login":"wcjr","id":4412848,"avatar_url":"https://avatars1.githubusercontent.com/u/4412848?v=4","gravatar_id":"","url":"https://api.github.com/users/wcjr","html_url":"https://github.com/wcjr","followers_url":"https://api.github.com/users/wcjr/followers","following_url":"https://api.github.com/users/wcjr/following{/other_user}","gists_url":"https://api.github.com/users/wcjr/gists{/gist_id}","starred_url":"https://api.github.com/users/wcjr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wcjr/subscriptions","organizations_url":"https://api.github.com/users/wcjr/orgs","repos_url":"https://api.github.com/users/wcjr/repos","events_url":"https://api.github.com/users/wcjr/events{/privacy}","received_events_url":"https://api.github.com/users/wcjr/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/silinternational/idp-id-broker/pulls/115/commits","review_comments_url":"https://api.github.com/repos/silinternational/idp-id-broker/pulls/115/comments","review_comment_url":"https://api.github.com/repos/silinternational/idp-id-broker/pulls/comments{/number}","comments_url":"https://api.github.com/repos/silinternational/idp-id-broker/issues/115/comments","statuses_url":"https://api.github.com/repos/silinternational/idp-id-broker/statuses/b7b7a4a9c9198e386556c24852041dff95dd1bd8","head":{"label":"silinternational:feature/more-email-types","ref":"feature/more-email-types","sha":"b7b7a4a9c9198e386556c24852041dff95dd1bd8","user":{"login":"silinternational","id":1247676,"avatar_url":"https://avatars1.githubusercontent.com/u/1247676?v=4","gravatar_id":"","url":"https://api.github.com/users/silinternational","html_url":"https://github.com/silinternational","followers_url":"https://api.github.com/users/silinternational/followers","following_url":"https://api.github.com/users/silinternational/following{/other_user}","gists_url":"https://api.github.com/users/silinternational/gists{/gist_id}","starred_url":"https://api.github.com/users/silinternational/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silinternational/subscriptions","organizations_url":"https://api.github.com/users/silinternational/orgs","repos_url":"https://api.github.com/users/silinternational/repos","events_url":"https://api.github.com/users/silinternational/events{/privacy}","received_events_url":"https://api.github.com/users/silinternational/received_events","type":"Organization","site_admin":false},"repo":{"id":80863131,"name":"idp-id-broker","full_name":"silinternational/idp-id-broker","owner":{"login":"silinternational","id":1247676,"avatar_url":"https://avatars1.githubusercontent.com/u/1247676?v=4","gravatar_id":"","url":"https://api.github.com/users/silinternational","html_url":"https://github.com/silinternational","followers_url":"https://api.github.com/users/silinternational/followers","following_url":"https://api.github.com/users/silinternational/following{/other_user}","gists_url":"https://api.github.com/users/silinternational/gists{/gist_id}","starred_url":"https://api.github.com/users/silinternational/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silinternational/subscriptions","organizations_url":"https://api.github.com/users/silinternational/orgs","repos_url":"https://api.github.com/users/silinternational/repos","events_url":"https://api.github.com/users/silinternational/events{/privacy}","received_events_url":"https://api.github.com/users/silinternational/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/silinternational/idp-id-broker","description":"API to abstract identity persistence in IdP-in-a-box solution","fork":false,"url":"https://api.github.com/repos/silinternational/idp-id-broker","forks_url":"https://api.github.com/repos/silinternational/idp-id-broker/forks","keys_url":"https://api.github.com/repos/silinternational/idp-id-broker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silinternational/idp-id-broker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silinternational/idp-id-broker/teams","hooks_url":"https://api.github.com/repos/silinternational/idp-id-broker/hooks","issue_events_url":"https://api.github.com/repos/silinternational/idp-id-broker/issues/events{/number}","events_url":"https://api.github.com/repos/silinternational/idp-id-broker/events","assignees_url":"https://api.github.com/repos/silinternational/idp-id-broker/assignees{/user}","branches_url":"https://api.github.com/repos/silinternational/idp-id-broker/branches{/branch}","tags_url":"https://api.github.com/repos/silinternational/idp-id-broker/tags","blobs_url":"https://api.github.com/repos/silinternational/idp-id-broker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silinternational/idp-id-broker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silinternational/idp-id-broker/git/refs{/sha}","trees_url":"https://api.github.com/repos/silinternational/idp-id-broker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silinternational/idp-id-broker/statuses/{sha}","languages_url":"https://api.github.com/repos/silinternational/idp-id-broker/languages","stargazers_url":"https://api.github.com/repos/silinternational/idp-id-broker/stargazers","contributors_url":"https://api.github.com/repos/silinternational/idp-id-broker/contributors","subscribers_url":"https://api.github.com/repos/silinternational/idp-id-broker/subscribers","subscription_url":"https://api.github.com/repos/silinternational/idp-id-broker/subscription","commits_url":"https://api.github.com/repos/silinternational/idp-id-broker/commits{/sha}","git_commits_url":"https://api.github.com/repos/silinternational/idp-id-broker/git/commits{/sha}","comments_url":"https://api.github.com/repos/silinternational/idp-id-broker/comments{/number}","issue_comment_url":"https://api.github.com/repos/silinternational/idp-id-broker/issues/comments{/number}","contents_url":"https://api.github.com/repos/silinternational/idp-id-broker/contents/{+path}","compare_url":"https://api.github.com/repos/silinternational/idp-id-broker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silinternational/idp-id-broker/merges","archive_url":"https://api.github.com/repos/silinternational/idp-id-broker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silinternational/idp-id-broker/downloads","issues_url":"https://api.github.com/repos/silinternational/idp-id-broker/issues{/number}","pulls_url":"https://api.github.com/repos/silinternational/idp-id-broker/pulls{/number}","milestones_url":"https://api.github.com/repos/silinternational/idp-id-broker/milestones{/number}","notifications_url":"https://api.github.com/repos/silinternational/idp-id-broker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silinternational/idp-id-broker/labels{/name}","releases_url":"https://api.github.com/repos/silinternational/idp-id-broker/releases{/id}","deployments_url":"https://api.github.com/repos/silinternational/idp-id-broker/deployments","created_at":"2017-02-03T19:41:02Z","updated_at":"2017-07-12T19:50:45Z","pushed_at":"2017-12-20T20:13:53Z","git_url":"git://github.com/silinternational/idp-id-broker.git","ssh_url":"git@github.com:silinternational/idp-id-broker.git","clone_url":"https://github.com/silinternational/idp-id-broker.git","svn_url":"https://github.com/silinternational/idp-id-broker","homepage":null,"size":658,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":14,"license":null,"forks":0,"open_issues":14,"watchers":0,"default_branch":"develop"}},"base":{"label":"silinternational:develop","ref":"develop","sha":"8f30752c51a67f16730dcf0b5aab1cb17687e093","user":{"login":"silinternational","id":1247676,"avatar_url":"https://avatars1.githubusercontent.com/u/1247676?v=4","gravatar_id":"","url":"https://api.github.com/users/silinternational","html_url":"https://github.com/silinternational","followers_url":"https://api.github.com/users/silinternational/followers","following_url":"https://api.github.com/users/silinternational/following{/other_user}","gists_url":"https://api.github.com/users/silinternational/gists{/gist_id}","starred_url":"https://api.github.com/users/silinternational/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silinternational/subscriptions","organizations_url":"https://api.github.com/users/silinternational/orgs","repos_url":"https://api.github.com/users/silinternational/repos","events_url":"https://api.github.com/users/silinternational/events{/privacy}","received_events_url":"https://api.github.com/users/silinternational/received_events","type":"Organization","site_admin":false},"repo":{"id":80863131,"name":"idp-id-broker","full_name":"silinternational/idp-id-broker","owner":{"login":"silinternational","id":1247676,"avatar_url":"https://avatars1.githubusercontent.com/u/1247676?v=4","gravatar_id":"","url":"https://api.github.com/users/silinternational","html_url":"https://github.com/silinternational","followers_url":"https://api.github.com/users/silinternational/followers","following_url":"https://api.github.com/users/silinternational/following{/other_user}","gists_url":"https://api.github.com/users/silinternational/gists{/gist_id}","starred_url":"https://api.github.com/users/silinternational/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/silinternational/subscriptions","organizations_url":"https://api.github.com/users/silinternational/orgs","repos_url":"https://api.github.com/users/silinternational/repos","events_url":"https://api.github.com/users/silinternational/events{/privacy}","received_events_url":"https://api.github.com/users/silinternational/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/silinternational/idp-id-broker","description":"API to abstract identity persistence in IdP-in-a-box solution","fork":false,"url":"https://api.github.com/repos/silinternational/idp-id-broker","forks_url":"https://api.github.com/repos/silinternational/idp-id-broker/forks","keys_url":"https://api.github.com/repos/silinternational/idp-id-broker/keys{/key_id}","collaborators_url":"https://api.github.com/repos/silinternational/idp-id-broker/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/silinternational/idp-id-broker/teams","hooks_url":"https://api.github.com/repos/silinternational/idp-id-broker/hooks","issue_events_url":"https://api.github.com/repos/silinternational/idp-id-broker/issues/events{/number}","events_url":"https://api.github.com/repos/silinternational/idp-id-broker/events","assignees_url":"https://api.github.com/repos/silinternational/idp-id-broker/assignees{/user}","branches_url":"https://api.github.com/repos/silinternational/idp-id-broker/branches{/branch}","tags_url":"https://api.github.com/repos/silinternational/idp-id-broker/tags","blobs_url":"https://api.github.com/repos/silinternational/idp-id-broker/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/silinternational/idp-id-broker/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/silinternational/idp-id-broker/git/refs{/sha}","trees_url":"https://api.github.com/repos/silinternational/idp-id-broker/git/trees{/sha}","statuses_url":"https://api.github.com/repos/silinternational/idp-id-broker/statuses/{sha}","languages_url":"https://api.github.com/repos/silinternational/idp-id-broker/languages","stargazers_url":"https://api.github.com/repos/silinternational/idp-id-broker/stargazers","contributors_url":"https://api.github.com/repos/silinternational/idp-id-broker/contributors","subscribers_url":"https://api.github.com/repos/silinternational/idp-id-broker/subscribers","subscription_url":"https://api.github.com/repos/silinternational/idp-id-broker/subscription","commits_url":"https://api.github.com/repos/silinternational/idp-id-broker/commits{/sha}","git_commits_url":"https://api.github.com/repos/silinternational/idp-id-broker/git/commits{/sha}","comments_url":"https://api.github.com/repos/silinternational/idp-id-broker/comments{/number}","issue_comment_url":"https://api.github.com/repos/silinternational/idp-id-broker/issues/comments{/number}","contents_url":"https://api.github.com/repos/silinternational/idp-id-broker/contents/{+path}","compare_url":"https://api.github.com/repos/silinternational/idp-id-broker/compare/{base}...{head}","merges_url":"https://api.github.com/repos/silinternational/idp-id-broker/merges","archive_url":"https://api.github.com/repos/silinternational/idp-id-broker/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/silinternational/idp-id-broker/downloads","issues_url":"https://api.github.com/repos/silinternational/idp-id-broker/issues{/number}","pulls_url":"https://api.github.com/repos/silinternational/idp-id-broker/pulls{/number}","milestones_url":"https://api.github.com/repos/silinternational/idp-id-broker/milestones{/number}","notifications_url":"https://api.github.com/repos/silinternational/idp-id-broker/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/silinternational/idp-id-broker/labels{/name}","releases_url":"https://api.github.com/repos/silinternational/idp-id-broker/releases{/id}","deployments_url":"https://api.github.com/repos/silinternational/idp-id-broker/deployments","created_at":"2017-02-03T19:41:02Z","updated_at":"2017-07-12T19:50:45Z","pushed_at":"2017-12-20T20:13:53Z","git_url":"git://github.com/silinternational/idp-id-broker.git","ssh_url":"git@github.com:silinternational/idp-id-broker.git","clone_url":"https://github.com/silinternational/idp-id-broker.git","svn_url":"https://github.com/silinternational/idp-id-broker","homepage":null,"size":658,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":14,"license":null,"forks":0,"open_issues":14,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/silinternational/idp-id-broker/pulls/115"},"html":{"href":"https://github.com/silinternational/idp-id-broker/pull/115"},"issue":{"href":"https://api.github.com/repos/silinternational/idp-id-broker/issues/115"},"comments":{"href":"https://api.github.com/repos/silinternational/idp-id-broker/issues/115/comments"},"review_comments":{"href":"https://api.github.com/repos/silinternational/idp-id-broker/pulls/115/comments"},"review_comment":{"href":"https://api.github.com/repos/silinternational/idp-id-broker/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/silinternational/idp-id-broker/pulls/115/commits"},"statuses":{"href":"https://api.github.com/repos/silinternational/idp-id-broker/statuses/b7b7a4a9c9198e386556c24852041dff95dd1bd8"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"forevermatt"}}