Start implementing Trello API service

Implement name of system to import
Implement need validate data
Fix allowed system list
Start implementing Trello API service

Signed-off-by: Vitor Mattos <vitor@php.rio>
This commit is contained in:
Vitor Mattos
2021-07-24 20:26:34 -03:00
committed by Julius Härtl
parent c7a37ea425
commit 202ea30090
14 changed files with 219 additions and 38 deletions

View File

@@ -50,16 +50,23 @@ class BoardImportApiControllerTest extends \Test\TestCase {
}
public function testGetAllowedSystems() {
$allowedSystems = [
[
'name' => '',
'class' => '',
'internalName' => 'trelloJson'
]
];
$this->boardImportService
->method('getAllowedImportSystems')
->willReturn(['trello']);
->willReturn($allowedSystems);
$actual = $this->controller->getAllowedSystems();
$expected = new DataResponse(['trello'], HTTP::STATUS_OK);
$expected = new DataResponse($allowedSystems, HTTP::STATUS_OK);
$this->assertEquals($expected, $actual);
}
public function testImport() {
$system = 'trello';
$system = 'trelloJson';
$config = [
'owner' => 'test'
];