Refactor and improvements on command

Check available helpers
Default permission: view only
Moved validate setting from helper to command
Turn more easy create a importer
Docblock and improvements on interface
lcfirst on system property
Helper moved to ImporHelper folder
Moved fixtures to ImportHelper
Rename settings to config
Big refactor to move import methods to service

Signed-off-by: Vitor Mattos <vitor@php.rio>
This commit is contained in:
Vitor Mattos
2021-07-12 10:42:36 -03:00
committed by Julius Härtl
parent eb8bf3f22b
commit fd92fc3c4d
13 changed files with 494 additions and 296 deletions

View File

@@ -23,7 +23,7 @@
namespace OCA\Deck\Command;
use OCA\Deck\Command\Helper\TrelloHelper;
use OCA\Deck\Command\ImportHelper\TrelloHelper;
use Symfony\Component\Console\Helper\HelperSet;
use Symfony\Component\Console\Helper\QuestionHelper;
use Symfony\Component\Console\Input\InputInterface;
@@ -55,12 +55,12 @@ class BoardImportTest extends \Test\TestCase {
$input->method('getOption')
->withConsecutive(
[$this->equalTo('system')],
[$this->equalTo('setting')],
[$this->equalTo('config')],
[$this->equalTo('data')]
)
->will($this->returnValueMap([
['system', 'trello'],
['setting', __DIR__ . '/fixtures/setting-trello.json'],
['config', __DIR__ . '/fixtures/config-trello.json'],
['data', __DIR__ . '/fixtures/data-trello.json']
]));
$output = $this->createMock(OutputInterface::class);