File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -168,4 +168,14 @@ public function subscriptions()
168168 {
169169 return $ this ->get ('/user/subscriptions ' );
170170 }
171+
172+ /**
173+ * @link https://developer.github.com/v3/integrations/#list-installations-for-user
174+ *
175+ * @param array $params
176+ */
177+ public function installations (array $ params = array ())
178+ {
179+ return $ this ->get ('/user/installations ' , array_merge (array ('page ' => 1 ), $ params ));
180+ }
171181}
Original file line number Diff line number Diff line change @@ -84,6 +84,22 @@ public function shouldGetWatchedRepositories()
8484 $ this ->assertEquals ($ expectedArray , $ api ->watched (1 ));
8585 }
8686
87+ /**
88+ * @test
89+ */
90+ public function shouldGetInstallationsForUser ()
91+ {
92+ $ result = ['installation1 ' , 'installation2 ' ];
93+
94+ $ api = $ this ->getApiMock ();
95+ $ api ->expects ($ this ->once ())
96+ ->method ('get ' )
97+ ->with ('/user/installations ' )
98+ ->willReturn ($ result );
99+
100+ $ this ->assertEquals ($ result , $ api ->installations ());
101+ }
102+
87103 /**
88104 * @test
89105 */
You can’t perform that action at this time.
0 commit comments