Skip to content

Commit

Permalink
add users api
Browse files Browse the repository at this point in the history
  • Loading branch information
Seretos committed Oct 17, 2018
1 parent f173dba commit 6500be8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/api/Plans.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ public function create(int $projectId, string $name, string $description = null,
return $plan;
}

public function createEntry(int $planId, int $suiteId, string $name, array $configIds = [], array $runs = [], string $description = null, bool $all = true, array $cases = []){
public function createEntry(int $planId, int $suiteId, string $name, array $configIds = [], array $runs = [], string $description = null, bool $all = true, array $cases = [], int $assignedTo = null){
$entry = $this->connector->send_post('add_plan_entry/'.$this->encodePath($planId),
['suite_id' => $suiteId,'name' => $name, 'description' => $description, 'include_all' => $all, 'case_ids' => $cases, 'config_ids' => $configIds, 'runs' => $runs]);
['suite_id' => $suiteId,'name' => $name, 'description' => $description, 'include_all' => $all, 'case_ids' => $cases, 'config_ids' => $configIds, 'runs' => $runs,'assignedto_id' => $assignedTo]);
$this->cache = [];
return $entry;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/api/PlansTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public function create(){
*/
public function createEntry(){
$this->mockApiConnector->expects($this->once())->method('send_post')
->with('add_plan_entry/1',['suite_id' => 1, 'name' => 'test', 'description' => null, 'include_all' => true,'case_ids' => [],'config_ids' => [],'runs' => []])
->with('add_plan_entry/1',['suite_id' => 1, 'name' => 'test', 'description' => null, 'include_all' => true,'case_ids' => [],'config_ids' => [],'runs' => [],'assignedto_id' => null])
->will($this->returnValue(['id' => 1,'name' => 'myPlanEntry']));

$this->assertSame(['id' => 1,'name' => 'myPlanEntry'],$this->plans->createEntry(1,1,'test'));
Expand Down

0 comments on commit 6500be8

Please sign in to comment.