Skip to content

Commit 0f97f72

Browse files
drummm1guelpf
authored andcommitted
Move test to the correct class
1 parent d2ea22b commit 0f97f72

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

test/Gitlab/Tests/Api/ProjectsTest.php

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -193,38 +193,6 @@ 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->mergeBase(1, array('efgh5678efgh5678efgh5678efgh5678efgh5678', '1234567812345678123456781234567812345678')));
226-
}
227-
228196
/**
229197
* @test
230198
*/

test/Gitlab/Tests/Api/RepositoriesTest.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,38 @@ public function shouldGetContributors()
515515
$this->assertEquals($expectedArray, $api->contributors(1));
516516
}
517517

518+
/**
519+
* @test
520+
*/
521+
public function shouldGetMergeBase()
522+
{
523+
$expectedArray = array(
524+
'id' => 'abcd1234abcd1234abcd1234abcd1234abcd1234',
525+
'short_id' => 'abcd1234',
526+
'title' => 'A commit',
527+
'created_at' => '2018-01-01T00:00:00.000Z',
528+
'parent_ids' => array(
529+
'efgh5678efgh5678efgh5678efgh5678efgh5678',
530+
),
531+
'message' => 'A commit',
532+
'author_name' => 'Jane Doe',
533+
'author_email' => '[email protected]',
534+
'authored_date' => '2018-01-01T00:00:00.000Z',
535+
'committer_name' => 'Jane Doe',
536+
'committer_email' => '[email protected]',
537+
'committed_date' => '2018-01-01T00:00:00.000Z',
538+
);
539+
540+
$api = $this->getApiMock();
541+
$api->expects($this->once())
542+
->method('get')
543+
->with('projects/1/repository/merge_base', array('refs' => array('efgh5678efgh5678efgh5678efgh5678efgh5678', '1234567812345678123456781234567812345678')))
544+
->will($this->returnValue($expectedArray))
545+
;
546+
547+
$this->assertEquals($expectedArray, $api->mergeBase(1, array('efgh5678efgh5678efgh5678efgh5678efgh5678', '1234567812345678123456781234567812345678')));
548+
}
549+
518550
protected function getApiClass()
519551
{
520552
return 'Gitlab\Api\Repositories';

0 commit comments

Comments
 (0)