diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-06-26 10:25:13 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-06-26 10:25:13 -0400 |
commit | 4a230d331ec220fc32a48525afb308af0d9787fa (patch) | |
tree | 514aa3d703155b7f97a2c77147c9fd74cef60f84 /tests/integration/SwimlaneTest.php | |
parent | 922e0fb6de06a98774418612e0b0f75af72b6dbb (diff) |
Added application and project roles validation for API procedure calls
Diffstat (limited to 'tests/integration/SwimlaneTest.php')
-rw-r--r-- | tests/integration/SwimlaneTest.php | 93 |
1 files changed, 0 insertions, 93 deletions
diff --git a/tests/integration/SwimlaneTest.php b/tests/integration/SwimlaneTest.php deleted file mode 100644 index 4f703414..00000000 --- a/tests/integration/SwimlaneTest.php +++ /dev/null @@ -1,93 +0,0 @@ -<?php - -require_once __DIR__.'/BaseIntegrationTest.php'; - -class SwimlaneTest extends BaseIntegrationTest -{ - protected $projectName = 'My project to test swimlanes'; - private $swimlaneId = 0; - - public function testAll() - { - $this->assertCreateTeamProject(); - } - - public function assertGetDefaultSwimlane() - { - $swimlane = $this->app->getDefaultSwimlane($this->projectId); - $this->assertNotEmpty($swimlane); - $this->assertEquals('Default swimlane', $swimlane['default_swimlane']); - } - - public function assertAddSwimlane() - { - $this->swimlaneId = $this->app->addSwimlane($this->projectId, 'Swimlane 1'); - $this->assertNotFalse($this->swimlaneId); - $this->assertNotFalse($this->app->addSwimlane($this->projectId, 'Swimlane 2')); - } - - public function assertGetSwimlane() - { - $swimlane = $this->app->getSwimlane($this->swimlaneId); - $this->assertInternalType('array', $swimlane); - $this->assertEquals('Swimlane 1', $swimlane['name']); - } - - public function assertUpdateSwimlane() - { - $this->assertTrue($this->app->updateSwimlane($this->swimlaneId, 'Another swimlane')); - - $swimlane = $this->app->getSwimlaneById($this->swimlaneId); - $this->assertEquals('Another swimlane', $swimlane['name']); - } - - public function assertDisableSwimlane() - { - $this->assertTrue($this->app->disableSwimlane($this->projectId, $this->swimlaneId)); - - $swimlane = $this->app->getSwimlaneById($this->swimlaneId); - $this->assertEquals(0, $swimlane['is_active']); - } - - public function assertEnableSwimlane() - { - $this->assertTrue($this->app->enableSwimlane($this->projectId, $this->swimlaneId)); - - $swimlane = $this->app->getSwimlaneById($this->swimlaneId); - $this->assertEquals(1, $swimlane['is_active']); - } - - public function assertGetAllSwimlanes() - { - $swimlanes = $this->app->getAllSwimlanes($this->projectId); - $this->assertCount(2, $swimlanes); - $this->assertEquals('Another swimlane', $swimlanes[0]['name']); - $this->assertEquals('Swimlane 2', $swimlanes[1]['name']); - } - - public function assertGetActiveSwimlane() - { - $this->assertTrue($this->app->disableSwimlane($this->projectId, $this->swimlaneId)); - - $swimlanes = $this->app->getActiveSwimlanes($this->projectId); - $this->assertCount(2, $swimlanes); - $this->assertEquals('Default swimlane', $swimlanes[0]['name']); - $this->assertEquals('Swimlane 2', $swimlanes[1]['name']); - } - - public function assertRemoveSwimlane() - { - $this->assertTrue($this->app->removeSwimlane($this->projectId, $this->swimlaneId)); - } - - public function assertChangePosition() - { - $swimlaneId1 = $this->app->addSwimlane($this->projectId, 'Swimlane A'); - $this->assertNotFalse($this->app->addSwimlane($this->projectId, 'Swimlane B')); - - $swimlanes = $this->app->getAllSwimlanes($this->projectId); - $this->assertCount(3, $swimlanes); - - $this->assertTrue($this->app->changeSwimlanePosition($this->projectId, $swimlaneId1, 3)); - } -} |