Skip to content

Commit 4935d6a

Browse files
author
Dickriven Chellemboyee
committed
add project test with statistics
1 parent 6bc0309 commit 4935d6a

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

test/Gitlab/Tests/Api/ProjectsTest.php

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,33 @@ public function shouldShowProject()
110110
$this->assertEquals($expectedArray, $api->show(1));
111111
}
112112

113+
/**
114+
* @test
115+
*/
116+
public function shouldShowProjectWithStatistics()
117+
{
118+
$expectedArray = array(
119+
'id' => 1,
120+
'name' => 'Project Name',
121+
'statistics' => array(
122+
'commit_count' => 37,
123+
'storage_size' => 1038090,
124+
'repository_size' => 1038090,
125+
'lfs_objects_size' => 0,
126+
'job_artifacts_size' => 0
127+
)
128+
);
129+
130+
$api = $this->getApiMock();
131+
$api->expects($this->once())
132+
->method('get')
133+
->with('projects/1', ['statistics' => true])
134+
->will($this->returnValue($expectedArray))
135+
;
136+
137+
$this->assertEquals($expectedArray, $api->show(1));
138+
}
139+
113140
/**
114141
* @test
115142
*/

0 commit comments

Comments
 (0)