2022-12-11 23:12:17 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
|
|
|
*
|
|
|
|
* https://www.d3data.de
|
|
|
|
*
|
|
|
|
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
|
|
|
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
|
|
|
|
* @link https://www.oxidmodule.com
|
|
|
|
*/
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace D3\Webauthn\tests\unit\Setup;
|
|
|
|
|
|
|
|
use D3\TestingTools\Development\CanAccessRestricted;
|
|
|
|
use D3\Webauthn\Setup\Actions;
|
2023-01-21 13:50:18 +01:00
|
|
|
use D3\Webauthn\tests\unit\WAUnitTestCase;
|
2022-12-12 23:41:07 +01:00
|
|
|
use Exception;
|
2023-02-10 00:52:44 +01:00
|
|
|
use OxidEsales\DoctrineMigrationWrapper\Migrations;
|
|
|
|
use OxidEsales\DoctrineMigrationWrapper\MigrationsBuilder;
|
2022-12-11 23:12:17 +01:00
|
|
|
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
|
|
|
use OxidEsales\Eshop\Core\DbMetaDataHandler;
|
|
|
|
use OxidEsales\Eshop\Core\Registry;
|
|
|
|
use OxidEsales\Eshop\Core\SeoEncoder;
|
|
|
|
use OxidEsales\Eshop\Core\Utils;
|
|
|
|
use OxidEsales\Eshop\Core\UtilsView;
|
|
|
|
use OxidEsales\Eshop\Core\ViewConfig;
|
|
|
|
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Bridge\ShopConfigurationDaoBridge;
|
|
|
|
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Bridge\ShopConfigurationDaoBridgeInterface;
|
|
|
|
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\DataObject\ModuleConfiguration;
|
|
|
|
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\DataObject\ShopConfiguration;
|
|
|
|
use OxidEsales\EshopCommunity\Internal\Framework\Module\Configuration\Exception\ModuleConfigurationNotFoundException;
|
|
|
|
use PHPUnit\Framework\MockObject\MockObject;
|
|
|
|
use Psr\Log\LoggerInterface;
|
|
|
|
use ReflectionException;
|
|
|
|
use Symfony\Component\DependencyInjection\Container;
|
|
|
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
|
|
|
|
2023-01-21 13:50:18 +01:00
|
|
|
class ActionsTest extends WAUnitTestCase
|
2022-12-11 23:12:17 +01:00
|
|
|
{
|
|
|
|
use CanAccessRestricted;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
2023-02-10 00:52:44 +01:00
|
|
|
* @covers \D3\Webauthn\Setup\Actions::runModuleMigrations()
|
2022-12-11 23:12:17 +01:00
|
|
|
*/
|
2023-02-10 00:52:44 +01:00
|
|
|
public function canRunModuleMigrations()
|
2022-12-11 23:12:17 +01:00
|
|
|
{
|
2023-02-10 00:52:44 +01:00
|
|
|
/** @var Migrations|MockObject $migrationMock */
|
|
|
|
$migrationMock = $this->getMockBuilder(Migrations::class)
|
|
|
|
->onlyMethods(['execute'])
|
|
|
|
->disableOriginalConstructor()
|
2022-12-11 23:12:17 +01:00
|
|
|
->getMock();
|
2023-02-10 00:52:44 +01:00
|
|
|
$migrationMock->expects($this->atLeastOnce())->method('execute')->with(
|
|
|
|
$this->identicalTo('migrations:migrate'),
|
|
|
|
$this->identicalTo('d3webauthn')
|
2022-12-11 23:12:17 +01:00
|
|
|
);
|
|
|
|
|
2023-02-10 00:52:44 +01:00
|
|
|
/** @var MigrationsBuilder|MockObject $migrationsBuilderMock */
|
|
|
|
$migrationsBuilderMock = $this->getMockBuilder(MigrationsBuilder::class)
|
|
|
|
->onlyMethods(['build'])
|
2022-12-11 23:12:17 +01:00
|
|
|
->getMock();
|
2023-02-10 00:52:44 +01:00
|
|
|
$migrationsBuilderMock->method('build')->willReturn($migrationMock);
|
|
|
|
d3GetOxidDIC()->set('d3ox.webauthn.'.MigrationsBuilder::class, $migrationsBuilderMock);
|
2022-12-11 23:12:17 +01:00
|
|
|
|
2023-01-21 13:50:18 +01:00
|
|
|
/** @var Actions $sut */
|
|
|
|
$sut = oxNew(Actions::class);
|
2022-12-11 23:12:17 +01:00
|
|
|
|
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
2023-02-10 00:52:44 +01:00
|
|
|
'runModuleMigrations'
|
2022-12-11 23:12:17 +01:00
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Setup\Actions::regenerateViews
|
|
|
|
*/
|
|
|
|
public function canRegenerateViews()
|
|
|
|
{
|
|
|
|
/** @var DbMetaDataHandler|MockObject $DbMetaDataMock */
|
|
|
|
$DbMetaDataMock = $this->getMockBuilder(DbMetaDataHandler::class)
|
|
|
|
->onlyMethods(['updateViews'])
|
|
|
|
->getMock();
|
|
|
|
$DbMetaDataMock->expects($this->once())->method('updateViews');
|
2023-01-21 13:50:18 +01:00
|
|
|
d3GetOxidDIC()->set('d3ox.webauthn.'.DbMetaDataHandler::class, $DbMetaDataMock);
|
2022-12-11 23:12:17 +01:00
|
|
|
|
2023-01-21 13:50:18 +01:00
|
|
|
/** @var Actions $sut */
|
|
|
|
$sut = oxNew(Actions::class);
|
2022-12-11 23:12:17 +01:00
|
|
|
|
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
|
|
|
'regenerateViews'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @dataProvider canClearCacheDataProvider
|
|
|
|
* @covers \D3\Webauthn\Setup\Actions::clearCache
|
|
|
|
*/
|
|
|
|
public function canClearCache($throwException)
|
|
|
|
{
|
|
|
|
/** @var LoggerInterface|MockObject $loggerMock */
|
|
|
|
$loggerMock = $this->getMockForAbstractClass(LoggerInterface::class, [], '', true, true, true, ['error', 'debug']);
|
|
|
|
$loggerMock->expects($throwException ? $this->atLeastOnce() : $this->never())
|
|
|
|
->method('error')->willReturn(true);
|
2023-01-21 13:50:18 +01:00
|
|
|
d3GetOxidDIC()->set('d3ox.webauthn.'.LoggerInterface::class, $loggerMock);
|
2022-12-11 23:12:17 +01:00
|
|
|
|
|
|
|
/** @var UtilsView|MockObject $utilsViewMock */
|
|
|
|
$utilsViewMock = $this->getMockBuilder(UtilsView::class)
|
|
|
|
->onlyMethods(['addErrorToDisplay'])
|
|
|
|
->getMock();
|
|
|
|
$utilsViewMock->expects($throwException ? $this->atLeastOnce() : $this->never())
|
|
|
|
->method('addErrorToDisplay');
|
2023-01-21 13:50:18 +01:00
|
|
|
d3GetOxidDIC()->set('d3ox.webauthn.'.UtilsView::class, $utilsViewMock);
|
2022-12-11 23:12:17 +01:00
|
|
|
|
|
|
|
/** @var Utils|MockObject $utilsMock */
|
|
|
|
$utilsMock = $this->getMockBuilder(Utils::class)
|
|
|
|
->onlyMethods(['resetTemplateCache', 'resetLanguageCache'])
|
|
|
|
->getMock();
|
|
|
|
$utilsMock->expects($throwException ? $this->never() : $this->once())
|
|
|
|
->method('resetTemplateCache');
|
|
|
|
$utilsMock->expects($throwException ? $this->never() : $this->once())
|
|
|
|
->method('resetLanguageCache');
|
2023-01-21 13:50:18 +01:00
|
|
|
d3GetOxidDIC()->set('d3ox.webauthn.'.Utils::class, $utilsMock);
|
2022-12-11 23:12:17 +01:00
|
|
|
|
|
|
|
/** @var Actions|MockObject $sut */
|
|
|
|
$sut = $this->getMockBuilder(Actions::class)
|
2023-01-21 13:50:18 +01:00
|
|
|
->onlyMethods(['getModuleTemplates'])
|
2022-12-11 23:12:17 +01:00
|
|
|
->getMock();
|
|
|
|
$sut->method('getModuleTemplates')->will(
|
|
|
|
$throwException ?
|
|
|
|
$this->throwException(oxNew(ModuleConfigurationNotFoundException::class)) :
|
|
|
|
$this->returnValue([])
|
|
|
|
);
|
|
|
|
|
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
|
|
|
'clearCache'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function canClearCacheDataProvider(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'throws exception' => [true],
|
|
|
|
'dont throws exception' => [false],
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Setup\Actions::getModuleTemplates
|
|
|
|
*/
|
|
|
|
public function canGetModuleTemplates()
|
|
|
|
{
|
|
|
|
/** @var ModuleConfiguration|MockObject $moduleConfigurationMock */
|
|
|
|
$moduleConfigurationMock = $this->getMockBuilder(ModuleConfiguration::class)
|
|
|
|
->getMock();
|
|
|
|
|
|
|
|
/** @var ShopConfiguration|MockObject $shopConfigurationMock */
|
|
|
|
$shopConfigurationMock = $this->getMockBuilder(ShopConfiguration::class)
|
|
|
|
->onlyMethods(['getModuleConfiguration'])
|
|
|
|
->getMock();
|
|
|
|
$shopConfigurationMock->method('getModuleConfiguration')->willReturn($moduleConfigurationMock);
|
|
|
|
|
|
|
|
/** @var ShopConfigurationDaoBridge|MockObject $shopConfigurationDaoBridgeMock */
|
|
|
|
$shopConfigurationDaoBridgeMock = $this->getMockBuilder(ShopConfigurationDaoBridge::class)
|
|
|
|
->disableOriginalConstructor()
|
|
|
|
->onlyMethods(['get'])
|
|
|
|
->getMock();
|
|
|
|
$shopConfigurationDaoBridgeMock->method('get')->willReturn($shopConfigurationMock);
|
|
|
|
|
|
|
|
/** @var Container|MockObject $dicMock */
|
|
|
|
$dicMock = $this->getMockBuilder(Container::class)
|
|
|
|
->onlyMethods(['get'])
|
|
|
|
->getMock();
|
|
|
|
$dicMock->method('get')->willReturnCallback(
|
|
|
|
function () use ($shopConfigurationDaoBridgeMock) {
|
|
|
|
$args = func_get_args();
|
|
|
|
switch ($args[0]) {
|
|
|
|
case ShopConfigurationDaoBridgeInterface::class:
|
|
|
|
return $shopConfigurationDaoBridgeMock;
|
|
|
|
default:
|
|
|
|
return Registry::get($args[0]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
);
|
|
|
|
|
|
|
|
/** @var Actions|MockObject $sut */
|
|
|
|
$sut = $this->getMockBuilder(Actions::class)
|
|
|
|
->onlyMethods(['getDIContainer', 'getModuleTemplatesFromTemplates', 'getModuleTemplatesFromBlocks'])
|
|
|
|
->getMock();
|
|
|
|
$sut->method('getDIContainer')->willReturn($dicMock);
|
|
|
|
$sut->expects($this->once())->method('getModuleTemplatesFromTemplates')->willReturn([1, 2]);
|
|
|
|
$sut->expects($this->once())->method('getModuleTemplatesFromBlocks')->willReturn([2, 3]);
|
|
|
|
|
|
|
|
$this->assertSame(
|
|
|
|
[0 => 1, 1 => 2, 3 => 3],
|
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
|
|
|
'getModuleTemplates'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Setup\Actions::getModuleTemplatesFromTemplates
|
|
|
|
*/
|
|
|
|
public function canGetModuleTemplatesFromTemplates()
|
|
|
|
{
|
|
|
|
$expected = "templateKeyFixture";
|
|
|
|
|
|
|
|
/** @var ModuleConfiguration\Template|MockObject $templateMock */
|
|
|
|
$templateMock = $this->getMockBuilder(ModuleConfiguration\Template::class)
|
|
|
|
->disableOriginalConstructor()
|
|
|
|
->onlyMethods(['getTemplateKey'])
|
|
|
|
->getMock();
|
|
|
|
$templateMock->method('getTemplateKey')->willReturn($expected);
|
|
|
|
|
|
|
|
/** @var ModuleConfiguration|MockObject $moduleConfigurationMock */
|
|
|
|
$moduleConfigurationMock = $this->getMockBuilder(ModuleConfiguration::class)
|
|
|
|
->onlyMethods(['getTemplates'])
|
|
|
|
->getMock();
|
|
|
|
$moduleConfigurationMock->method('getTemplates')->willReturn([$templateMock]);
|
|
|
|
|
|
|
|
$sut = oxNew(Actions::class);
|
|
|
|
|
|
|
|
$this->assertSame(
|
|
|
|
[$expected],
|
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
|
|
|
'getModuleTemplatesFromTemplates',
|
|
|
|
[$moduleConfigurationMock]
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Setup\Actions::getModuleTemplatesFromBlocks
|
|
|
|
*/
|
|
|
|
public function canGetModuleTemplatesFromBlocks()
|
|
|
|
{
|
|
|
|
/** @var ModuleConfiguration\TemplateBlock|MockObject $templateBlockMock */
|
|
|
|
$templateBlockMock = $this->getMockBuilder(ModuleConfiguration\TemplateBlock::class)
|
|
|
|
->disableOriginalConstructor()
|
|
|
|
->onlyMethods(['getShopTemplatePath'])
|
|
|
|
->getMock();
|
|
|
|
$templateBlockMock->method('getShopTemplatePath')->willReturn('mypath/myFile.tpl');
|
|
|
|
|
|
|
|
/** @var ModuleConfiguration|MockObject $moduleConfigurationMock */
|
|
|
|
$moduleConfigurationMock = $this->getMockBuilder(ModuleConfiguration::class)
|
|
|
|
->onlyMethods(['getTemplateBlocks'])
|
|
|
|
->getMock();
|
|
|
|
$moduleConfigurationMock->method('getTemplateBlocks')->willReturn([$templateBlockMock]);
|
|
|
|
|
|
|
|
$sut = oxNew(Actions::class);
|
|
|
|
|
|
|
|
$this->assertSame(
|
|
|
|
['myFile.tpl'],
|
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
|
|
|
'getModuleTemplatesFromBlocks',
|
|
|
|
[$moduleConfigurationMock]
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
*
|
|
|
|
* @param $hasSeoUrl
|
|
|
|
* @param $throwException
|
|
|
|
*
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @dataProvider canCheckSeoUrlDataProvider
|
|
|
|
* @covers \D3\Webauthn\Setup\Actions::seoUrl
|
|
|
|
*/
|
|
|
|
public function canCheckSeoUrl($hasSeoUrl, $throwException)
|
|
|
|
{
|
|
|
|
/** @var UtilsView|MockObject $utilsViewMock */
|
|
|
|
$utilsViewMock = $this->getMockBuilder(UtilsView::class)
|
|
|
|
->onlyMethods(['addErrorToDisplay'])
|
|
|
|
->getMock();
|
|
|
|
$utilsViewMock->expects($throwException ? $this->atLeastOnce() : $this->never())
|
|
|
|
->method('addErrorToDisplay');
|
2023-01-21 13:50:18 +01:00
|
|
|
d3GetOxidDIC()->set('d3ox.webauthn.'.UtilsView::class, $utilsViewMock);
|
2022-12-11 23:12:17 +01:00
|
|
|
|
|
|
|
/** @var LoggerInterface|MockObject $loggerMock */
|
|
|
|
$loggerMock = $this->getMockForAbstractClass(LoggerInterface::class, [], '', true, true, true, ['error', 'debug']);
|
|
|
|
$loggerMock->expects($throwException ? $this->atLeastOnce() : $this->never())
|
|
|
|
->method('error')->willReturn(true);
|
2023-01-21 13:50:18 +01:00
|
|
|
d3GetOxidDIC()->set('d3ox.webauthn.'.LoggerInterface::class, $loggerMock);
|
2022-12-11 23:12:17 +01:00
|
|
|
|
|
|
|
/** @var Actions|MockObject $sut */
|
|
|
|
$sut = $this->getMockBuilder(Actions::class)
|
2023-01-21 13:50:18 +01:00
|
|
|
->onlyMethods(['hasSeoUrl', 'createSeoUrl'])
|
2022-12-11 23:12:17 +01:00
|
|
|
->getMock();
|
|
|
|
$sut->method('hasSeoUrl')->willReturn($hasSeoUrl);
|
|
|
|
$sut->expects($hasSeoUrl ? $this->never() : $this->once())->method('createSeoUrl')->will(
|
|
|
|
$throwException ?
|
2022-12-12 23:41:07 +01:00
|
|
|
$this->throwException(oxNew(Exception::class)) :
|
2022-12-11 23:12:17 +01:00
|
|
|
$this->returnValue(true)
|
|
|
|
);
|
|
|
|
|
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
|
|
|
'seoUrl'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function canCheckSeoUrlDataProvider(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'already has SEO url' => [true, false],
|
|
|
|
'has no SEO url' => [false, false],
|
|
|
|
'has no SEO url throw exception' => [false, true],
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @dataProvider canCheckHasSeoUrlDataProvider
|
|
|
|
* @covers \D3\Webauthn\Setup\Actions::hasSeoUrl
|
|
|
|
*/
|
|
|
|
public function canCheckHasSeoUrl($staticUrl, $expected)
|
|
|
|
{
|
|
|
|
/** @var SeoEncoder|MockObject $seoEncoderMock */
|
|
|
|
$seoEncoderMock = $this->getMockBuilder(SeoEncoder::class)
|
|
|
|
->onlyMethods(['getStaticUrl'])
|
|
|
|
->getMock();
|
|
|
|
$seoEncoderMock->method('getStaticUrl')->willReturn($staticUrl);
|
2023-01-21 13:50:18 +01:00
|
|
|
d3GetOxidDIC()->set('d3ox.webauthn.'.SeoEncoder::class, $seoEncoderMock);
|
2022-12-11 23:12:17 +01:00
|
|
|
|
|
|
|
/** @var ViewConfig|MockObject $viewConfigMock */
|
|
|
|
$viewConfigMock = $this->getMockBuilder(ViewConfig::class)
|
|
|
|
->onlyMethods(['getSelfLink'])
|
|
|
|
->getMock();
|
|
|
|
$viewConfigMock->method('getSelfLink')->willReturn('https://testshop.dev/');
|
|
|
|
|
|
|
|
/** @var FrontendController|MockObject $controllerMock */
|
|
|
|
$controllerMock = $this->getMockBuilder(FrontendController::class)
|
|
|
|
->onlyMethods(['getViewConfig'])
|
|
|
|
->getMock();
|
|
|
|
$controllerMock->method('getViewConfig')->willReturn($viewConfigMock);
|
2023-01-21 13:50:18 +01:00
|
|
|
d3GetOxidDIC()->set('d3ox.webauthn.'.FrontendController::class, $controllerMock);
|
2022-12-11 23:12:17 +01:00
|
|
|
|
2023-01-21 13:50:18 +01:00
|
|
|
/** @var Actions $sut */
|
|
|
|
$sut = oxNew(Actions::class);
|
2022-12-11 23:12:17 +01:00
|
|
|
|
|
|
|
$this->assertSame(
|
|
|
|
$expected,
|
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
|
|
|
'hasSeoUrl'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array[]
|
|
|
|
*/
|
|
|
|
public function canCheckHasSeoUrlDataProvider(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'has SEO url' => ['https://testshop.dev/securitykeys', true],
|
2022-12-13 22:24:33 +01:00
|
|
|
'has no SEO url'=> ['', false],
|
2022-12-11 23:12:17 +01:00
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Setup\Actions::createSeoUrl
|
|
|
|
*/
|
|
|
|
public function canCreateSeoUrl()
|
|
|
|
{
|
|
|
|
/** @var SeoEncoder|MockObject $seoEncoderMock */
|
|
|
|
$seoEncoderMock = $this->getMockBuilder(SeoEncoder::class)
|
|
|
|
->onlyMethods(['addSeoEntry'])
|
|
|
|
->getMock();
|
|
|
|
$seoEncoderMock->expects($this->exactly(2))->method('addSeoEntry');
|
2023-01-21 13:50:18 +01:00
|
|
|
d3GetOxidDIC()->set('d3ox.webauthn.'.SeoEncoder::class, $seoEncoderMock);
|
2022-12-11 23:12:17 +01:00
|
|
|
|
2023-01-21 13:50:18 +01:00
|
|
|
/** @var Actions $sut */
|
|
|
|
$sut = oxNew(Actions::class);
|
2022-12-11 23:12:17 +01:00
|
|
|
|
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
|
|
|
'createSeoUrl'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Setup\Actions::getDIContainer
|
|
|
|
*/
|
|
|
|
public function canGetDIContainer()
|
|
|
|
{
|
|
|
|
$this->assertInstanceOf(
|
|
|
|
ContainerBuilder::class,
|
|
|
|
$this->callMethod(
|
|
|
|
oxNew(Actions::class),
|
|
|
|
'getDIContainer'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
2022-12-13 22:24:33 +01:00
|
|
|
}
|