File tree Expand file tree Collapse file tree 3 files changed +59
-0
lines changed Expand file tree Collapse file tree 3 files changed +59
-0
lines changed Original file line number Diff line number Diff line change @@ -270,6 +270,26 @@ public function shouldGetIssueTimeStats()
270
270
$ this ->assertEquals ($ expectedArray , $ api ->getTimeStats (1 , 2 ));
271
271
}
272
272
273
+ /**
274
+ * @test
275
+ */
276
+ public function shouldGetIssueAwardEmoji ()
277
+ {
278
+ $ expectedArray = array (
279
+ array ('id ' => 1 , 'name ' => 'sparkles ' ),
280
+ array ('id ' => 2 , 'name ' => 'heart_eyes ' ),
281
+ );
282
+
283
+ $ api = $ this ->getApiMock ();
284
+ $ api ->expects ($ this ->once ())
285
+ ->method ('get ' )
286
+ ->with ('projects/1/issues/2/award_emoji ' )
287
+ ->will ($ this ->returnValue ($ expectedArray ))
288
+ ;
289
+
290
+ $ this ->assertEquals ($ expectedArray , $ api ->awardEmoji (1 , 2 ));
291
+ }
292
+
273
293
protected function getApiClass ()
274
294
{
275
295
return 'Gitlab\Api\Issues ' ;
Original file line number Diff line number Diff line change @@ -266,6 +266,25 @@ public function shouldGetMergeRequestApprovals()
266
266
$ this ->assertEquals ($ expectedArray , $ api ->all (1 , ['iids ' => [2 ]]));
267
267
}
268
268
269
+ /**
270
+ * @test
271
+ */
272
+ public function shouldGetMergeRequestAwardEmoji ()
273
+ {
274
+ $ expectedArray = array (
275
+ array ('id ' => 1 , 'name ' => 'sparkles ' ),
276
+ array ('id ' => 2 , 'name ' => 'heart_eyes ' ),
277
+ );
278
+
279
+ $ api = $ this ->getApiMock ();
280
+ $ api ->expects ($ this ->once ())
281
+ ->method ('get ' )
282
+ ->with ('projects/1/merge_requests/2/award_emoji ' )
283
+ ->will ($ this ->returnValue ($ expectedArray ))
284
+ ;
285
+
286
+ $ this ->assertEquals ($ expectedArray , $ api ->awardEmoji (1 , 2 ));
287
+ }
269
288
270
289
protected function getMultipleMergeRequestsData ()
271
290
{
Original file line number Diff line number Diff line change @@ -107,6 +107,26 @@ public function shouldRemoveSnippet()
107
107
$ this ->assertEquals ($ expectedBool , $ api ->remove (1 , 3 ));
108
108
}
109
109
110
+ /**
111
+ * @test
112
+ */
113
+ public function shouldGetSnippetAwardEmoji ()
114
+ {
115
+ $ expectedArray = array (
116
+ array ('id ' => 1 , 'name ' => 'sparkles ' ),
117
+ array ('id ' => 2 , 'name ' => 'heart_eyes ' ),
118
+ );
119
+
120
+ $ api = $ this ->getApiMock ();
121
+ $ api ->expects ($ this ->once ())
122
+ ->method ('get ' )
123
+ ->with ('projects/1/snippets/2/award_emoji ' )
124
+ ->will ($ this ->returnValue ($ expectedArray ))
125
+ ;
126
+
127
+ $ this ->assertEquals ($ expectedArray , $ api ->awardEmoji (1 , 2 ));
128
+ }
129
+
110
130
protected function getApiClass ()
111
131
{
112
132
return 'Gitlab\Api\Snippets ' ;
You can’t perform that action at this time.
0 commit comments