Skip to content

Commit 5918788

Browse files
turkishjoe-hackm1guelpf
authored andcommitted
add test
1 parent c01c566 commit 5918788

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

test/Gitlab/Tests/Api/UsersTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,25 @@ public function shouldShowUsersProjects()
112112
$this->assertEquals($expectedArray, $api->usersProjects(1));
113113
}
114114

115+
/**
116+
* @test
117+
*/
118+
public function shouldShowUsersProjectsWithLimit()
119+
{
120+
$expectedArray = array(
121+
array('id' => 1, 'name' => 'matt-project-1')
122+
);
123+
124+
$api = $this->getApiMock();
125+
$api->expects($this->once())
126+
->method('get')
127+
->with('users/1/projects')
128+
->will($this->returnValue($expectedArray))
129+
;
130+
131+
$this->assertEquals($expectedArray, $api->usersProjects(1, ['per_page'=>1]));
132+
}
133+
115134
/**
116135
* @test
117136
*/

0 commit comments

Comments
 (0)