Skip to content

Commit 9da39d9

Browse files
lifeofguenterm1guelpf
authored andcommitted
Extend create groups
1 parent 47c13d7 commit 9da39d9

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

test/Gitlab/Tests/Api/GroupsTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,35 +121,35 @@ public function shouldCreateGroup()
121121
/**
122122
* @test
123123
*/
124-
public function shouldCreateGroupWithDescriptionVisibilityAndParentId()
124+
public function shouldCreateGroupWithDescriptionAndVisibility()
125125
{
126-
$expectedArray = array('id' => 1, 'name' => 'A new group', 'visibility_level' => 2, 'parent_id' => 666);
126+
$expectedArray = array('id' => 1, 'name' => 'A new group', 'visibility_level' => 2);
127127

128128
$api = $this->getApiMock();
129129
$api->expects($this->once())
130-
->method('post')
131-
->with('groups', array('name' => 'A new group', 'path' => 'a-new-group', 'description' => 'Description', 'visibility' => 'public', 'parent_id' => 666))
132-
->will($this->returnValue($expectedArray))
130+
->method('post')
131+
->with('groups', array('name' => 'A new group', 'path' => 'a-new-group', 'description' => 'Description', 'visibility' => 'public'))
132+
->will($this->returnValue($expectedArray))
133133
;
134134

135-
$this->assertEquals($expectedArray, $api->create('A new group', 'a-new-group', 'Description', 'public', null, null, 666));
135+
$this->assertEquals($expectedArray, $api->create('A new group', 'a-new-group', 'Description', 'public'));
136136
}
137137

138138
/**
139139
* @test
140140
*/
141-
public function shouldCreateGroupWithDescriptionAndVisibility()
141+
public function shouldCreateGroupWithDescriptionVisibilityAndParentId()
142142
{
143-
$expectedArray = array('id' => 1, 'name' => 'A new group', 'visibility_level' => 2);
143+
$expectedArray = array('id' => 1, 'name' => 'A new group', 'visibility_level' => 2, 'parent_id' => 666);
144144

145145
$api = $this->getApiMock();
146146
$api->expects($this->once())
147147
->method('post')
148-
->with('groups', array('name' => 'A new group', 'path' => 'a-new-group', 'description' => 'Description', 'visibility' => 'public'))
148+
->with('groups', array('name' => 'A new group', 'path' => 'a-new-group', 'description' => 'Description', 'visibility' => 'public', 'parent_id' => 666))
149149
->will($this->returnValue($expectedArray))
150150
;
151151

152-
$this->assertEquals($expectedArray, $api->create('A new group', 'a-new-group', 'Description', 'public'));
152+
$this->assertEquals($expectedArray, $api->create('A new group', 'a-new-group', 'Description', 'public', null, null, 666));
153153
}
154154

155155
/**

0 commit comments

Comments
 (0)