File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -66,6 +66,19 @@ public function getInstallation($installation_id)
66
66
return $ this ->get ('/app/installations/ ' .rawurldecode ($ installation_id ));
67
67
}
68
68
69
+ /**
70
+ * Get an installation of the application for an organization
71
+ *
72
+ * @link https://developer.github.com/v3/apps/#get-an-organization-installation
73
+ *
74
+ * @param $org An organization
75
+ * @return array
76
+ */
77
+ public function getInstallationForOrganization ($ org )
78
+ {
79
+ return $ this ->get ('/org/ ' .rawurldecode ($ org ).'/installation ' );
80
+ }
81
+
69
82
/**
70
83
* Delete an installation of the application
71
84
*
Original file line number Diff line number Diff line change @@ -56,6 +56,22 @@ public function shouldGetInstallationForApplication()
56
56
$ this ->assertEquals ($ result , $ api ->getInstallation ('1234 ' ));
57
57
}
58
58
59
+ /**
60
+ * @test
61
+ */
62
+ public function shouldGetInstallationForOrganization ()
63
+ {
64
+ $ result = ['installation1 ' ];
65
+
66
+ $ api = $ this ->getApiMock ();
67
+ $ api ->expects ($ this ->once ())
68
+ ->method ('get ' )
69
+ ->with ('/org/1234/installation ' )
70
+ ->willReturn ($ result );
71
+
72
+ $ this ->assertEquals ($ result , $ api ->getInstallationForOrganization ('1234 ' ));
73
+ }
74
+
59
75
/**
60
76
* @test
61
77
*/
You can’t perform that action at this time.
0 commit comments