@@ -193,6 +193,38 @@ public function shouldArchiveProject()
193193 $ this ->assertEquals ($ expectedArray , $ api ->archive (1 ));
194194 }
195195
196+ /**
197+ * @test
198+ */
199+ public function shouldGetMergeBase ()
200+ {
201+ $ expectedArray = array (
202+ 'id ' => 'abcd1234abcd1234abcd1234abcd1234abcd1234 ' ,
203+ 'short_id ' => 'abcd1234 ' ,
204+ 'title ' => 'A commit ' ,
205+ 'created_at ' => '2018-01-01T00:00:00.000Z ' ,
206+ 'parent_ids ' => array (
207+ 'efgh5678efgh5678efgh5678efgh5678efgh5678 ' ,
208+ ),
209+ 'message ' => 'A commit ' ,
210+ 'author_name ' => 'Jane Doe ' ,
211+ 'author_email ' =>
'[email protected] ' ,
212+ 'authored_date ' => '2018-01-01T00:00:00.000Z ' ,
213+ 'committer_name ' => 'Jane Doe ' ,
214+ 'committer_email ' =>
'[email protected] ' ,
215+ 'committed_date ' => '2018-01-01T00:00:00.000Z ' ,
216+ );
217+
218+ $ api = $ this ->getApiMock ();
219+ $ api ->expects ($ this ->once ())
220+ ->method ('get ' )
221+ ->with ('projects/1/repository/merge_base ' , array ('refs ' => array ('efgh5678efgh5678efgh5678efgh5678efgh5678 ' , '1234567812345678123456781234567812345678 ' )))
222+ ->will ($ this ->returnValue ($ expectedArray ))
223+ ;
224+
225+ $ this ->assertEquals ($ expectedArray , $ api ->archive (1 , array ('efgh5678efgh5678efgh5678efgh5678efgh5678 ' , '1234567812345678123456781234567812345678 ' )));
226+ }
227+
196228 /**
197229 * @test
198230 */
0 commit comments