Skip to content

Commit edbf2cd

Browse files
Fixed typos
1 parent 728b972 commit edbf2cd

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

src/Api/Groups.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ public function updateLabel($group_id, int $label_id, array $params)
328328
*
329329
* @return mixed
330330
*/
331-
public function removeLabel($group_id', int $label_id)
331+
public function removeLabel($group_id, int $label_id)
332332
{
333333
return $this->delete('groups/'.self::encodePath($group_id).'/labels/'.self::encodePath($label_id));
334334
}

tests/Api/GroupsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -365,11 +365,11 @@ public function shouldUpdateLabel(): void
365365
$api = $this->getApiMock();
366366
$api->expects($this->once())
367367
->method('put')
368-
->with('groups/1/labels', ['name' => 'bug', 'new_name' => 'big-bug', 'color' => '#00ffff'])
368+
->with('groups/1/labels/123', ['new_name' => 'big-bug', 'color' => '#00ffff'])
369369
->will($this->returnValue($expectedArray))
370370
;
371371

372-
$this->assertEquals($expectedArray, $api->updateLabel(1, ['name' => 'bug', 'new_name' => 'big-bug', 'color' => '#00ffff']));
372+
$this->assertEquals($expectedArray, $api->updateLabel(1, 123, ['new_name' => 'big-bug', 'color' => '#00ffff']));
373373
}
374374

375375
/**
@@ -382,11 +382,11 @@ public function shouldRemoveLabel(): void
382382
$api = $this->getApiMock();
383383
$api->expects($this->once())
384384
->method('delete')
385-
->with('groups/1/labels', ['name' => 'bug'])
385+
->with('groups/1/labels/456', [])
386386
->will($this->returnValue($expectedBool))
387387
;
388388

389-
$this->assertEquals($expectedBool, $api->removeLabel(1, 'bug'));
389+
$this->assertEquals($expectedBool, $api->removeLabel(1, 456));
390390
}
391391

392392
public function shouldGetVariables(): void

tests/Api/ProjectsTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1288,12 +1288,12 @@ public function shouldUpdateLabel(): void
12881288
$api = $this->getApiMock();
12891289
$api->expects($this->once())
12901290
->method('put')
1291-
->with('projects/1/labels', ['name' => 'bug', 'new_name' => 'big-bug', 'color' => '#00ffff'])
1291+
->with('projects/1/labels/123', ['new_name' => 'big-bug', 'color' => '#00ffff'])
12921292
->will($this->returnValue($expectedArray));
12931293

12941294
$this->assertEquals(
12951295
$expectedArray,
1296-
$api->updateLabel(1, ['name' => 'bug', 'new_name' => 'big-bug', 'color' => '#00ffff'])
1296+
$api->updateLabel(1, 123, ['new_name' => 'big-bug', 'color' => '#00ffff'])
12971297
);
12981298
}
12991299

@@ -1307,10 +1307,10 @@ public function shouldRemoveLabel(): void
13071307
$api = $this->getApiMock();
13081308
$api->expects($this->once())
13091309
->method('delete')
1310-
->with('projects/1/labels', ['name' => 'bug'])
1310+
->with('projects/1/labels/456', [])
13111311
->will($this->returnValue($expectedBool));
13121312

1313-
$this->assertEquals($expectedBool, $api->removeLabel(1, 'bug'));
1313+
$this->assertEquals($expectedBool, $api->removeLabel(1, 456));
13141314
}
13151315

13161316
/**

0 commit comments

Comments
 (0)