add ViewId tests

This commit is contained in:
Daniel Seifert 2024-05-13 16:24:34 +02:00
parent 957de3ac0f
commit 445a58a819
4 changed files with 18 additions and 5 deletions

View File

@ -44,10 +44,11 @@ class d3ActionWizard extends AdminDetailsController
$this->configuration = oxNew(Configuration::class);
}
public function getViewId()
public function getViewId(): string
{
return 'd3mxDataWizard_Action';
}
public function getGroups(): array
{
return $this->configuration->getActionGroups();

View File

@ -49,7 +49,7 @@ class d3ExportWizard extends AdminDetailsController
$this->configuration = oxNew(Configuration::class);
}
public function getViewId()
public function getViewId(): string
{
return 'd3mxDataWizard_Export';
}

View File

@ -72,6 +72,21 @@ abstract class d3AdminController extends d3ModCfgUnitTestCase
);
}
/**
* @test
* @return void
* @throws ReflectionException
* @covers \D3\DataWizard\Application\Controller\Admin\d3ActionWizard::getViewId
* @covers \D3\DataWizard\Application\Controller\Admin\d3ExportWizard::getViewId
*/
public function canGetViewId(): void
{
$viewId = $this->callMethod($this->_oController, 'getViewId');
$this->assertIsString($viewId);
$this->assertStringStartsWith('d3mxDataWizard', $viewId);
}
/**
* @covers \D3\DataWizard\Application\Controller\Admin\d3ActionWizard::runTask()
* @covers \D3\DataWizard\Application\Controller\Admin\d3ExportWizard::runTask()

View File

@ -24,7 +24,6 @@ use D3\DataWizard\Application\Model\ExportRenderer\RendererBridge;
use D3\DataWizard\tests\tools\d3TestAction;
use D3\DataWizard\tests\tools\d3TestExport;
use Doctrine\DBAL\Exception as DBALException;
use OxidEsales\Eshop\Core\Config;
use OxidEsales\Eshop\Core\Exception\DatabaseErrorException;
use OxidEsales\Eshop\Core\Registry;
use OxidEsales\Eshop\Core\Request;
@ -193,8 +192,6 @@ class d3ExportWizardTest extends d3AdminController
];
}
/**
* @return string[][]
*/