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()
168
168
{
169
169
return $ this ->get ('/user/subscriptions ' );
170
170
}
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
+ }
171
181
}
Original file line number Diff line number Diff line change @@ -84,6 +84,22 @@ public function shouldGetWatchedRepositories()
84
84
$ this ->assertEquals ($ expectedArray , $ api ->watched (1 ));
85
85
}
86
86
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
+
87
103
/**
88
104
* @test
89
105
*/
You can’t perform that action at this time.
0 commit comments