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 @@ -66,6 +66,18 @@ public function getInstallation($installation_id)
66
66
return $ this ->get ('/app/installations/ ' .rawurldecode ($ installation_id ));
67
67
}
68
68
69
+ /**
70
+ * Delete an installation of the application
71
+ *
72
+ * @link https://developer.github.com/v3/apps/#delete-an-installation
73
+ *
74
+ * @param $installation_id An integration installation id
75
+ */
76
+ public function removeInstallation ($ installation_id )
77
+ {
78
+ $ this ->delete ('/app/installations/ ' .rawurldecode ($ installation_id ));
79
+ }
80
+
69
81
/**
70
82
* List repositories that are accessible to the authenticated installation.
71
83
*
Original file line number Diff line number Diff line change @@ -56,6 +56,20 @@ public function shouldGetInstallationForApplication()
56
56
$ this ->assertEquals ($ result , $ api ->getInstallation ('1234 ' ));
57
57
}
58
58
59
+ /**
60
+ * @test
61
+ */
62
+ public function shouldDeleteInstallationForApplication ()
63
+ {
64
+ $ id = 123 ;
65
+ $ api = $ this ->getApiMock ();
66
+ $ api ->expects ($ this ->once ())
67
+ ->method ('delete ' )
68
+ ->with ('/app/installations/ ' .$ id );
69
+
70
+ $ api ->removeInstallation ($ id );
71
+ }
72
+
59
73
/**
60
74
* @test
61
75
*/
You can’t perform that action at this time.
0 commit comments