{"action":"created","comment":{"url":"https://api.github.com/repos/ilios/ilios/pulls/comments/39797266","id":39797266,"diff_hunk":"@@ -0,0 +1,75 @@\n+<?php\n+namespace Ilios\\CoreBundle\\Tests\\Service;\n+\n+use Symfony\\Bundle\\FrameworkBundle\\Tests\\TestCase;\n+use Mockery as m;\n+\n+use Ilios\\CoreBundle\\Service\\Directory;\n+\n+class DirectoryTest extends TestCase\n+{\n+    public function tearDown()\n+    {\n+        m::close();\n+    }\n+\n+    public function testConstructor()\n+    {\n+        $ldapManager = m::mock('Ilios\\CoreBundle\\Service\\LdapManager');\n+        $obj = new Directory($ldapManager, 'campusId');\n+        $this->assertTrue($obj instanceof Directory);\n+    }\n+\n+    public function testFindByCampusId()","path":"src/Ilios/CoreBundle/Tests/Service/DirectoryTest.php","position":23,"original_position":23,"commit_id":"f3764d23ae101d7df993508e943b90189d84712a","original_commit_id":"f3764d23ae101d7df993508e943b90189d84712a","user":{"login":"stopfstedt","id":1410427,"avatar_url":"https://avatars.githubusercontent.com/u/1410427?v=3","gravatar_id":"","url":"https://api.github.com/users/stopfstedt","html_url":"https://github.com/stopfstedt","followers_url":"https://api.github.com/users/stopfstedt/followers","following_url":"https://api.github.com/users/stopfstedt/following{/other_user}","gists_url":"https://api.github.com/users/stopfstedt/gists{/gist_id}","starred_url":"https://api.github.com/users/stopfstedt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stopfstedt/subscriptions","organizations_url":"https://api.github.com/users/stopfstedt/orgs","repos_url":"https://api.github.com/users/stopfstedt/repos","events_url":"https://api.github.com/users/stopfstedt/events{/privacy}","received_events_url":"https://api.github.com/users/stopfstedt/received_events","type":"User","site_admin":false},"body":"add `@covers` annotation, to test methods.","created_at":"2015-09-17T20:51:04Z","updated_at":"2015-09-17T20:51:04Z","html_url":"https://github.com/ilios/ilios/pull/1013#discussion_r39797266","pull_request_url":"https://api.github.com/repos/ilios/ilios/pulls/1013","_links":{"self":{"href":"https://api.github.com/repos/ilios/ilios/pulls/comments/39797266"},"html":{"href":"https://github.com/ilios/ilios/pull/1013#discussion_r39797266"},"pull_request":{"href":"https://api.github.com/repos/ilios/ilios/pulls/1013"}}},"pull_request":{"url":"https://api.github.com/repos/ilios/ilios/pulls/1013","id":44749679,"html_url":"https://github.com/ilios/ilios/pull/1013","diff_url":"https://github.com/ilios/ilios/pull/1013.diff","patch_url":"https://github.com/ilios/ilios/pull/1013.patch","issue_url":"https://api.github.com/repos/ilios/ilios/issues/1013","number":1013,"state":"open","locked":false,"title":"User Management Commands","user":{"login":"jrjohnson","id":349624,"avatar_url":"https://avatars.githubusercontent.com/u/349624?v=3","gravatar_id":"","url":"https://api.github.com/users/jrjohnson","html_url":"https://github.com/jrjohnson","followers_url":"https://api.github.com/users/jrjohnson/followers","following_url":"https://api.github.com/users/jrjohnson/following{/other_user}","gists_url":"https://api.github.com/users/jrjohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/jrjohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrjohnson/subscriptions","organizations_url":"https://api.github.com/users/jrjohnson/orgs","repos_url":"https://api.github.com/users/jrjohnson/repos","events_url":"https://api.github.com/users/jrjohnson/events{/privacy}","received_events_url":"https://api.github.com/users/jrjohnson/received_events","type":"User","site_admin":false},"body":"Adds commands for managing users:\r\n- `ilios:directory:add-students` takes a schoolId and an LDAP query and adds anyone it find in the query to the school.\r\n- `ilios:directory:add-user` adds a single user by campusId\r\n- `ilios:directory:sync-former-students` takes and LDAP query and marks anyone it finds as a former student\r\n- `ilios:directory:sync-user` looks up a single user in LDAP and syncs their user record with the directory.\r\n- `ilios:directory:sync-users` looks for every Ilios user in LDAP by their campusId.  It updated name / phone / and changes to the case of email automatically and addes PendingUserUpdate entries for other differences that require intervention.\r\n\r\nTogether these are the base of User synchronization.\r\n\r\nFixes #1011\r\nFixes #991\r\n\r\nI didn't include the API (controller, form, tests) for PendingUserUpdate.  I will do those separately.","created_at":"2015-09-11T06:15:55Z","updated_at":"2015-09-17T20:51:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"79be00bcc56243b2e91c314fe5854c6f5ce4489b","assignee":{"login":"stopfstedt","id":1410427,"avatar_url":"https://avatars.githubusercontent.com/u/1410427?v=3","gravatar_id":"","url":"https://api.github.com/users/stopfstedt","html_url":"https://github.com/stopfstedt","followers_url":"https://api.github.com/users/stopfstedt/followers","following_url":"https://api.github.com/users/stopfstedt/following{/other_user}","gists_url":"https://api.github.com/users/stopfstedt/gists{/gist_id}","starred_url":"https://api.github.com/users/stopfstedt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stopfstedt/subscriptions","organizations_url":"https://api.github.com/users/stopfstedt/orgs","repos_url":"https://api.github.com/users/stopfstedt/repos","events_url":"https://api.github.com/users/stopfstedt/events{/privacy}","received_events_url":"https://api.github.com/users/stopfstedt/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/ilios/ilios/pulls/1013/commits","review_comments_url":"https://api.github.com/repos/ilios/ilios/pulls/1013/comments","review_comment_url":"https://api.github.com/repos/ilios/ilios/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ilios/ilios/issues/1013/comments","statuses_url":"https://api.github.com/repos/ilios/ilios/statuses/f3764d23ae101d7df993508e943b90189d84712a","head":{"label":"jrjohnson:991-usersync","ref":"991-usersync","sha":"f3764d23ae101d7df993508e943b90189d84712a","user":{"login":"jrjohnson","id":349624,"avatar_url":"https://avatars.githubusercontent.com/u/349624?v=3","gravatar_id":"","url":"https://api.github.com/users/jrjohnson","html_url":"https://github.com/jrjohnson","followers_url":"https://api.github.com/users/jrjohnson/followers","following_url":"https://api.github.com/users/jrjohnson/following{/other_user}","gists_url":"https://api.github.com/users/jrjohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/jrjohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrjohnson/subscriptions","organizations_url":"https://api.github.com/users/jrjohnson/orgs","repos_url":"https://api.github.com/users/jrjohnson/repos","events_url":"https://api.github.com/users/jrjohnson/events{/privacy}","received_events_url":"https://api.github.com/users/jrjohnson/received_events","type":"User","site_admin":false},"repo":{"id":17072959,"name":"ilios","full_name":"jrjohnson/ilios","owner":{"login":"jrjohnson","id":349624,"avatar_url":"https://avatars.githubusercontent.com/u/349624?v=3","gravatar_id":"","url":"https://api.github.com/users/jrjohnson","html_url":"https://github.com/jrjohnson","followers_url":"https://api.github.com/users/jrjohnson/followers","following_url":"https://api.github.com/users/jrjohnson/following{/other_user}","gists_url":"https://api.github.com/users/jrjohnson/gists{/gist_id}","starred_url":"https://api.github.com/users/jrjohnson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrjohnson/subscriptions","organizations_url":"https://api.github.com/users/jrjohnson/orgs","repos_url":"https://api.github.com/users/jrjohnson/repos","events_url":"https://api.github.com/users/jrjohnson/events{/privacy}","received_events_url":"https://api.github.com/users/jrjohnson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jrjohnson/ilios","description":"Curriculum Management System for the Health Professions","fork":true,"url":"https://api.github.com/repos/jrjohnson/ilios","forks_url":"https://api.github.com/repos/jrjohnson/ilios/forks","keys_url":"https://api.github.com/repos/jrjohnson/ilios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jrjohnson/ilios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jrjohnson/ilios/teams","hooks_url":"https://api.github.com/repos/jrjohnson/ilios/hooks","issue_events_url":"https://api.github.com/repos/jrjohnson/ilios/issues/events{/number}","events_url":"https://api.github.com/repos/jrjohnson/ilios/events","assignees_url":"https://api.github.com/repos/jrjohnson/ilios/assignees{/user}","branches_url":"https://api.github.com/repos/jrjohnson/ilios/branches{/branch}","tags_url":"https://api.github.com/repos/jrjohnson/ilios/tags","blobs_url":"https://api.github.com/repos/jrjohnson/ilios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jrjohnson/ilios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jrjohnson/ilios/git/refs{/sha}","trees_url":"https://api.github.com/repos/jrjohnson/ilios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jrjohnson/ilios/statuses/{sha}","languages_url":"https://api.github.com/repos/jrjohnson/ilios/languages","stargazers_url":"https://api.github.com/repos/jrjohnson/ilios/stargazers","contributors_url":"https://api.github.com/repos/jrjohnson/ilios/contributors","subscribers_url":"https://api.github.com/repos/jrjohnson/ilios/subscribers","subscription_url":"https://api.github.com/repos/jrjohnson/ilios/subscription","commits_url":"https://api.github.com/repos/jrjohnson/ilios/commits{/sha}","git_commits_url":"https://api.github.com/repos/jrjohnson/ilios/git/commits{/sha}","comments_url":"https://api.github.com/repos/jrjohnson/ilios/comments{/number}","issue_comment_url":"https://api.github.com/repos/jrjohnson/ilios/issues/comments{/number}","contents_url":"https://api.github.com/repos/jrjohnson/ilios/contents/{+path}","compare_url":"https://api.github.com/repos/jrjohnson/ilios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jrjohnson/ilios/merges","archive_url":"https://api.github.com/repos/jrjohnson/ilios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jrjohnson/ilios/downloads","issues_url":"https://api.github.com/repos/jrjohnson/ilios/issues{/number}","pulls_url":"https://api.github.com/repos/jrjohnson/ilios/pulls{/number}","milestones_url":"https://api.github.com/repos/jrjohnson/ilios/milestones{/number}","notifications_url":"https://api.github.com/repos/jrjohnson/ilios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jrjohnson/ilios/labels{/name}","releases_url":"https://api.github.com/repos/jrjohnson/ilios/releases{/id}","created_at":"2014-02-21T23:08:16Z","updated_at":"2015-04-10T17:04:30Z","pushed_at":"2015-09-17T16:59:33Z","git_url":"git://github.com/jrjohnson/ilios.git","ssh_url":"git@github.com:jrjohnson/ilios.git","clone_url":"https://github.com/jrjohnson/ilios.git","svn_url":"https://github.com/jrjohnson/ilios","homepage":"https://www.iliosproject.org","size":45487,"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":"master"}},"base":{"label":"ilios:master","ref":"master","sha":"faab14b584e2559cde13cbebe3da5061822647a4","user":{"login":"ilios","id":2955721,"avatar_url":"https://avatars.githubusercontent.com/u/2955721?v=3","gravatar_id":"","url":"https://api.github.com/users/ilios","html_url":"https://github.com/ilios","followers_url":"https://api.github.com/users/ilios/followers","following_url":"https://api.github.com/users/ilios/following{/other_user}","gists_url":"https://api.github.com/users/ilios/gists{/gist_id}","starred_url":"https://api.github.com/users/ilios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilios/subscriptions","organizations_url":"https://api.github.com/users/ilios/orgs","repos_url":"https://api.github.com/users/ilios/repos","events_url":"https://api.github.com/users/ilios/events{/privacy}","received_events_url":"https://api.github.com/users/ilios/received_events","type":"Organization","site_admin":false},"repo":{"id":7026531,"name":"ilios","full_name":"ilios/ilios","owner":{"login":"ilios","id":2955721,"avatar_url":"https://avatars.githubusercontent.com/u/2955721?v=3","gravatar_id":"","url":"https://api.github.com/users/ilios","html_url":"https://github.com/ilios","followers_url":"https://api.github.com/users/ilios/followers","following_url":"https://api.github.com/users/ilios/following{/other_user}","gists_url":"https://api.github.com/users/ilios/gists{/gist_id}","starred_url":"https://api.github.com/users/ilios/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ilios/subscriptions","organizations_url":"https://api.github.com/users/ilios/orgs","repos_url":"https://api.github.com/users/ilios/repos","events_url":"https://api.github.com/users/ilios/events{/privacy}","received_events_url":"https://api.github.com/users/ilios/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ilios/ilios","description":"Curriculum Management System for the Health Professions","fork":false,"url":"https://api.github.com/repos/ilios/ilios","forks_url":"https://api.github.com/repos/ilios/ilios/forks","keys_url":"https://api.github.com/repos/ilios/ilios/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ilios/ilios/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ilios/ilios/teams","hooks_url":"https://api.github.com/repos/ilios/ilios/hooks","issue_events_url":"https://api.github.com/repos/ilios/ilios/issues/events{/number}","events_url":"https://api.github.com/repos/ilios/ilios/events","assignees_url":"https://api.github.com/repos/ilios/ilios/assignees{/user}","branches_url":"https://api.github.com/repos/ilios/ilios/branches{/branch}","tags_url":"https://api.github.com/repos/ilios/ilios/tags","blobs_url":"https://api.github.com/repos/ilios/ilios/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ilios/ilios/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ilios/ilios/git/refs{/sha}","trees_url":"https://api.github.com/repos/ilios/ilios/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ilios/ilios/statuses/{sha}","languages_url":"https://api.github.com/repos/ilios/ilios/languages","stargazers_url":"https://api.github.com/repos/ilios/ilios/stargazers","contributors_url":"https://api.github.com/repos/ilios/ilios/contributors","subscribers_url":"https://api.github.com/repos/ilios/ilios/subscribers","subscription_url":"https://api.github.com/repos/ilios/ilios/subscription","commits_url":"https://api.github.com/repos/ilios/ilios/commits{/sha}","git_commits_url":"https://api.github.com/repos/ilios/ilios/git/commits{/sha}","comments_url":"https://api.github.com/repos/ilios/ilios/comments{/number}","issue_comment_url":"https://api.github.com/repos/ilios/ilios/issues/comments{/number}","contents_url":"https://api.github.com/repos/ilios/ilios/contents/{+path}","compare_url":"https://api.github.com/repos/ilios/ilios/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ilios/ilios/merges","archive_url":"https://api.github.com/repos/ilios/ilios/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ilios/ilios/downloads","issues_url":"https://api.github.com/repos/ilios/ilios/issues{/number}","pulls_url":"https://api.github.com/repos/ilios/ilios/pulls{/number}","milestones_url":"https://api.github.com/repos/ilios/ilios/milestones{/number}","notifications_url":"https://api.github.com/repos/ilios/ilios/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ilios/ilios/labels{/name}","releases_url":"https://api.github.com/repos/ilios/ilios/releases{/id}","created_at":"2012-12-05T23:27:26Z","updated_at":"2015-08-20T21:10:41Z","pushed_at":"2015-09-17T16:59:34Z","git_url":"git://github.com/ilios/ilios.git","ssh_url":"git@github.com:ilios/ilios.git","clone_url":"https://github.com/ilios/ilios.git","svn_url":"https://github.com/ilios/ilios","homepage":"https://www.iliosproject.org","size":51083,"stargazers_count":17,"watchers_count":17,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":17,"mirror_url":null,"open_issues_count":33,"forks":17,"open_issues":33,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ilios/ilios/pulls/1013"},"html":{"href":"https://github.com/ilios/ilios/pull/1013"},"issue":{"href":"https://api.github.com/repos/ilios/ilios/issues/1013"},"comments":{"href":"https://api.github.com/repos/ilios/ilios/issues/1013/comments"},"review_comments":{"href":"https://api.github.com/repos/ilios/ilios/pulls/1013/comments"},"review_comment":{"href":"https://api.github.com/repos/ilios/ilios/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ilios/ilios/pulls/1013/commits"},"statuses":{"href":"https://api.github.com/repos/ilios/ilios/statuses/f3764d23ae101d7df993508e943b90189d84712a"}}}}