diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-06-26 11:57:28 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-06-26 11:57:28 -0400 |
commit | b48c0cecbb1f687641594430260a67938d870cbb (patch) | |
tree | 82169826993d3d8c4790b653ce3901e152f6d4d8 /tests/integration | |
parent | 4a230d331ec220fc32a48525afb308af0d9787fa (diff) |
Added new arguments to project API calls and update composer.json
Diffstat (limited to 'tests/integration')
-rw-r--r-- | tests/integration/ProjectProcedureTest.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/integration/ProjectProcedureTest.php b/tests/integration/ProjectProcedureTest.php index 1ebd48ae..a4b65241 100644 --- a/tests/integration/ProjectProcedureTest.php +++ b/tests/integration/ProjectProcedureTest.php @@ -13,6 +13,8 @@ class ProjectProcedureTest extends BaseProcedureTest $this->assertGetProjectByName(); $this->assertGetAllProjects(); $this->assertUpdateProject(); + $this->assertUpdateProjectIdentifier(); + $this->assertCreateProjectWithIdentifier(); $this->assertGetProjectActivity(); $this->assertGetProjectsActivity(); $this->assertEnableDisableProject(); @@ -69,6 +71,33 @@ class ProjectProcedureTest extends BaseProcedureTest $this->assertTrue($this->app->updateProject(array('project_id' => $this->projectId, 'name' => $this->projectName))); } + public function assertUpdateProjectIdentifier() + { + $this->assertTrue($this->app->updateProject(array( + 'project_id' => $this->projectId, + 'identifier' => 'MYPROJECT', + ))); + + $project = $this->app->getProjectById($this->projectId); + $this->assertNotNull($project); + $this->assertEquals($this->projectName, $project['name']); + $this->assertEquals('MYPROJECT', $project['identifier']); + } + + public function assertCreateProjectWithIdentifier() + { + $projectId = $this->app->createProject(array( + 'name' => 'My project with an identifier', + 'identifier' => 'MYPROJECTWITHIDENTIFIER', + )); + + $this->assertNotFalse($projectId); + + $project = $this->app->getProjectById($projectId); + $this->assertEquals('My project with an identifier', $project['name']); + $this->assertEquals('MYPROJECTWITHIDENTIFIER', $project['identifier']); + } + public function assertEnableDisableProject() { $this->assertTrue($this->app->disableProject($this->projectId)); |