2022-11-17 00:27:43 +01:00
|
|
|
<?php
|
|
|
|
|
2022-11-23 00:18:09 +01:00
|
|
|
/**
|
|
|
|
* 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\Application\Controller;
|
2022-11-17 00:27:43 +01:00
|
|
|
|
|
|
|
use D3\TestingTools\Development\CanAccessRestricted;
|
|
|
|
use D3\Webauthn\Application\Controller\d3webauthnlogin;
|
|
|
|
use D3\Webauthn\Application\Model\Exceptions\WebauthnException;
|
|
|
|
use D3\Webauthn\Application\Model\Webauthn;
|
|
|
|
use D3\Webauthn\Application\Model\WebauthnConf;
|
|
|
|
use OxidEsales\Eshop\Core\Routing\ControllerClassNameResolver;
|
|
|
|
use OxidEsales\Eshop\Core\Session;
|
|
|
|
use OxidEsales\Eshop\Core\Utils;
|
|
|
|
use PHPUnit\Framework\MockObject\MockObject;
|
|
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
use Psr\Log\LoggerInterface;
|
|
|
|
use ReflectionException;
|
|
|
|
|
|
|
|
class d3webauthnloginTest extends TestCase
|
|
|
|
{
|
|
|
|
use CanAccessRestricted;
|
|
|
|
|
2022-11-23 00:18:09 +01:00
|
|
|
protected $sutClassName = d3webauthnlogin::class;
|
2022-11-17 00:27:43 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Application\Controller\d3webauthnlogin::getNavigationParams
|
|
|
|
*/
|
|
|
|
public function canGetNavigationParams()
|
|
|
|
{
|
|
|
|
/** @var Session|MockObject $sessionMock */
|
|
|
|
$sessionMock = $this->getMockBuilder(Session::class)
|
|
|
|
->onlyMethods(['getVariable'])
|
|
|
|
->getMock();
|
|
|
|
$sessionMock->method('getVariable')->willReturn([
|
|
|
|
'key1' => 'variable1'
|
|
|
|
]);
|
|
|
|
|
|
|
|
/** @var d3webauthnlogin|MockObject $sut */
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut = $this->getMockBuilder($this->sutClassName)
|
2022-11-17 00:27:43 +01:00
|
|
|
->onlyMethods(['d3GetSession', 'd3CallMockableParent'])
|
|
|
|
->getMock();
|
|
|
|
$sut->method('d3GetSession')->willReturn($sessionMock);
|
|
|
|
$sut->method('d3CallMockableParent')->willReturn(['defKey1' => 'devValues1']);
|
|
|
|
|
|
|
|
$this->assertSame(
|
|
|
|
[
|
|
|
|
'defKey1' => 'devValues1',
|
|
|
|
'key1' => 'variable1',
|
|
|
|
'cl' => NULL,
|
|
|
|
],
|
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
|
|
|
'getNavigationParams'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @param $auth
|
|
|
|
* @param $userFromLogin
|
|
|
|
* @param $startRedirect
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Application\Controller\d3webauthnlogin::render
|
|
|
|
* @dataProvider canRenderDataProvider
|
|
|
|
*/
|
2022-11-23 00:18:09 +01:00
|
|
|
public function canRender($auth, $userFromLogin, $startRedirect, $redirectController = 'start')
|
2022-11-17 00:27:43 +01:00
|
|
|
{
|
|
|
|
/** @var Session|MockObject $sessionMock */
|
|
|
|
$sessionMock = $this->getMockBuilder(Session::class)
|
|
|
|
->onlyMethods(['hasVariable'])
|
|
|
|
->getMock();
|
|
|
|
$sessionMock->method('hasVariable')->willReturnMap([
|
|
|
|
[WebauthnConf::WEBAUTHN_SESSION_AUTH, $auth],
|
|
|
|
[WebauthnConf::WEBAUTHN_SESSION_CURRENTUSER, $userFromLogin]
|
|
|
|
]);
|
|
|
|
|
|
|
|
/** @var Utils|MockObject $utilsMock */
|
|
|
|
$utilsMock = $this->getMockBuilder(Utils::class)
|
|
|
|
->onlyMethods(['redirect'])
|
|
|
|
->getMock();
|
|
|
|
$utilsMock->expects($startRedirect ? $this->once() : $this->never())
|
2022-11-23 00:18:09 +01:00
|
|
|
->method('redirect')->with('index.php?cl='.$redirectController)->willReturn(true);
|
2022-11-17 00:27:43 +01:00
|
|
|
|
|
|
|
/** @var d3webauthnlogin|MockObject $sut */
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut = $this->getMockBuilder($this->sutClassName)
|
2022-11-17 00:27:43 +01:00
|
|
|
->onlyMethods(['d3GetSession', 'getUtils', 'd3CallMockableParent',
|
|
|
|
'generateCredentialRequest', 'addTplParam'])
|
|
|
|
->getMock();
|
|
|
|
$sut->method('d3GetSession')->willReturn($sessionMock);
|
|
|
|
$sut->method('getUtils')->willReturn($utilsMock);
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut->method('d3CallMockableParent')->willReturn('myTemplate.tpl');
|
2022-11-17 00:27:43 +01:00
|
|
|
$sut->expects($startRedirect ? $this->any() : $this->atLeastOnce())
|
|
|
|
->method('generateCredentialRequest');
|
|
|
|
$sut->expects($startRedirect ? $this->any() : $this->atLeastOnce())
|
|
|
|
->method('addTplParam')->with('navFormParams')->willReturn(true);
|
|
|
|
|
|
|
|
$this->assertSame(
|
2022-11-23 00:18:09 +01:00
|
|
|
'myTemplate.tpl',
|
2022-11-17 00:27:43 +01:00
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
|
|
|
'render'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function canRenderDataProvider(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'has request' => [false, true, false],
|
|
|
|
'has auth' => [true, true, true],
|
|
|
|
'missing user' => [false, false, true],
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Application\Controller\d3webauthnlogin::generateCredentialRequest
|
|
|
|
*/
|
|
|
|
public function canGenerateCredentialRequest()
|
|
|
|
{
|
|
|
|
$currUserFixture = 'currentUserFixture';
|
|
|
|
|
|
|
|
/** @var LoggerInterface|MockObject $loggerMock */
|
|
|
|
$loggerMock = $this->getMockForAbstractClass(LoggerInterface::class, [], '', true, true, true, ['error', 'debug']);
|
|
|
|
$loggerMock->expects($this->never())->method('error')->willReturn(true);
|
|
|
|
$loggerMock->expects($this->never())->method('debug')->willReturn(true);
|
|
|
|
|
|
|
|
/** @var Session|MockObject $sessionMock */
|
|
|
|
$sessionMock = $this->getMockBuilder(Session::class)
|
|
|
|
->onlyMethods(['getVariable'])
|
|
|
|
->getMock();
|
|
|
|
$sessionMock->method('getVariable')->willReturnMap([
|
|
|
|
[WebauthnConf::WEBAUTHN_SESSION_CURRENTUSER, $currUserFixture]
|
|
|
|
]);
|
|
|
|
|
|
|
|
/** @var Webauthn|MockObject $webAuthnMock */
|
|
|
|
$webAuthnMock = $this->getMockBuilder(Webauthn::class)
|
|
|
|
->onlyMethods(['getRequestOptions'])
|
|
|
|
->getMock();
|
|
|
|
$webAuthnMock->expects($this->once())->method('getRequestOptions')->with($currUserFixture)
|
|
|
|
->willReturn('success');
|
|
|
|
|
|
|
|
/** @var d3webauthnlogin|MockObject $sut */
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut = $this->getMockBuilder($this->sutClassName)
|
|
|
|
->onlyMethods(['d3GetSession', 'd3GetWebauthnObject', 'addTplParam', 'd3GetLoggerObject'])
|
2022-11-17 00:27:43 +01:00
|
|
|
->getMock();
|
|
|
|
$sut->method('d3GetSession')->willReturn($sessionMock);
|
|
|
|
$sut->method('d3GetWebauthnObject')->willReturn($webAuthnMock);
|
|
|
|
$sut->expects($this->atLeast(2))
|
|
|
|
->method('addTplParam')->willReturn(true);
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut->method('d3GetLoggerObject')->willReturn($loggerMock);
|
2022-11-17 00:27:43 +01:00
|
|
|
|
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
|
|
|
'generateCredentialRequest'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Application\Controller\d3webauthnlogin::generateCredentialRequest
|
|
|
|
*/
|
2022-11-23 00:18:09 +01:00
|
|
|
public function generateCredentialRequestFailed($redirectClass = 'start')
|
2022-11-17 00:27:43 +01:00
|
|
|
{
|
|
|
|
$currUserFixture = 'currentUserFixture';
|
|
|
|
|
|
|
|
/** @var LoggerInterface|MockObject $loggerMock */
|
|
|
|
$loggerMock = $this->getMockForAbstractClass(LoggerInterface::class, [], '', true, true, true, ['error', 'debug']);
|
|
|
|
$loggerMock->expects($this->atLeastOnce())->method('error')->willReturn(true);
|
|
|
|
$loggerMock->expects($this->atLeastOnce())->method('debug')->willReturn(true);
|
|
|
|
|
|
|
|
/** @var Session|MockObject $sessionMock */
|
|
|
|
$sessionMock = $this->getMockBuilder(Session::class)
|
|
|
|
->onlyMethods(['getVariable', 'setVariable'])
|
|
|
|
->getMock();
|
|
|
|
$sessionMock->method('getVariable')->willReturnMap([
|
|
|
|
[WebauthnConf::WEBAUTHN_SESSION_CURRENTUSER, $currUserFixture]
|
|
|
|
]);
|
|
|
|
$sessionMock->expects($this->once())->method('setVariable')->with(WebauthnConf::GLOBAL_SWITCH)
|
|
|
|
->willReturn(true);
|
|
|
|
|
|
|
|
/** @var Webauthn|MockObject $webAuthnMock */
|
|
|
|
$webAuthnMock = $this->getMockBuilder(Webauthn::class)
|
|
|
|
->onlyMethods(['getRequestOptions'])
|
|
|
|
->getMock();
|
|
|
|
$webAuthnMock->expects($this->once())->method('getRequestOptions')->with($currUserFixture)
|
|
|
|
->willThrowException(oxNew(WebauthnException::class, 'foobar0'));
|
|
|
|
|
|
|
|
/** @var Utils|MockObject $utilsMock */
|
|
|
|
$utilsMock = $this->getMockBuilder(Utils::class)
|
|
|
|
->onlyMethods(['redirect'])
|
|
|
|
->getMock();
|
|
|
|
$utilsMock->expects($this->once())->method('redirect')
|
2022-11-23 00:18:09 +01:00
|
|
|
->with('index.php?cl='.$redirectClass)->willReturn(true);
|
2022-11-17 00:27:43 +01:00
|
|
|
|
|
|
|
/** @var d3webauthnlogin|MockObject $sut */
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut = $this->getMockBuilder($this->sutClassName)
|
2022-11-17 00:27:43 +01:00
|
|
|
->onlyMethods(['d3GetSession', 'd3GetWebauthnObject', 'addTplParam',
|
2022-11-23 00:18:09 +01:00
|
|
|
'd3GetLoggerObject', 'getUtils'])
|
2022-11-17 00:27:43 +01:00
|
|
|
->getMock();
|
|
|
|
$sut->method('d3GetSession')->willReturn($sessionMock);
|
|
|
|
$sut->method('d3GetWebauthnObject')->willReturn($webAuthnMock);
|
|
|
|
$sut->expects($this->never())
|
|
|
|
->method('addTplParam')->willReturn(true);
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut->expects($this->atLeast(2))->method('d3GetLoggerObject')->willReturn($loggerMock);
|
2022-11-17 00:27:43 +01:00
|
|
|
$sut->method('getUtils')->willReturn($utilsMock);
|
|
|
|
|
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
|
|
|
'generateCredentialRequest'
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Application\Controller\d3webauthnlogin::getUtils
|
|
|
|
*/
|
|
|
|
public function getUtilsReturnsRightInstance()
|
|
|
|
{
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut = oxNew($this->sutClassName);
|
|
|
|
|
2022-11-17 00:27:43 +01:00
|
|
|
$this->assertInstanceOf(
|
|
|
|
Utils::class,
|
|
|
|
$this->callMethod(
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut,
|
2022-11-17 00:27:43 +01:00
|
|
|
'getUtils'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Application\Controller\d3webauthnlogin::getPreviousClass
|
|
|
|
*/
|
|
|
|
public function canGetPreviousClass()
|
|
|
|
{
|
|
|
|
$currClassFixture = 'currentClassFixture';
|
|
|
|
|
|
|
|
/** @var Session|MockObject $sessionMock */
|
|
|
|
$sessionMock = $this->getMockBuilder(Session::class)
|
|
|
|
->onlyMethods(['getVariable'])
|
|
|
|
->getMock();
|
|
|
|
$sessionMock->method('getVariable')->willReturnMap([
|
|
|
|
[WebauthnConf::WEBAUTHN_SESSION_CURRENTCLASS, $currClassFixture]
|
|
|
|
]);
|
|
|
|
|
|
|
|
/** @var d3webauthnlogin|MockObject $sut */
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut = $this->getMockBuilder($this->sutClassName)
|
2022-11-17 00:27:43 +01:00
|
|
|
->onlyMethods(['d3GetSession'])
|
|
|
|
->getMock();
|
|
|
|
$sut->method('d3GetSession')->willReturn($sessionMock);
|
|
|
|
|
|
|
|
$this->assertSame(
|
|
|
|
$currClassFixture,
|
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
|
|
|
'getPreviousClass'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @param $currClass
|
|
|
|
* @param $isOrderStep
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Application\Controller\d3webauthnlogin::previousClassIsOrderStep
|
|
|
|
* @dataProvider canPreviousClassIsOrderStepDataProvider
|
|
|
|
*/
|
|
|
|
public function canPreviousClassIsOrderStep($currClass, $isOrderStep)
|
|
|
|
{
|
|
|
|
/** @var Session|MockObject $sessionMock */
|
|
|
|
$sessionMock = $this->getMockBuilder(Session::class)
|
|
|
|
->onlyMethods(['getVariable'])
|
|
|
|
->getMock();
|
|
|
|
$sessionMock->method('getVariable')->willReturnMap([
|
|
|
|
[WebauthnConf::WEBAUTHN_SESSION_CURRENTCLASS, $currClass]
|
|
|
|
]);
|
|
|
|
|
|
|
|
/** @var d3webauthnlogin|MockObject $sut */
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut = $this->getMockBuilder($this->sutClassName)
|
2022-11-17 00:27:43 +01:00
|
|
|
->onlyMethods(['d3GetSession'])
|
|
|
|
->getMock();
|
|
|
|
$sut->method('d3GetSession')->willReturn($sessionMock);
|
|
|
|
|
|
|
|
$this->assertSame(
|
|
|
|
$isOrderStep,
|
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
|
|
|
'previousClassIsOrderStep'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array[]
|
|
|
|
*/
|
|
|
|
public function canPreviousClassIsOrderStepDataProvider(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
'checkout class' => ['payment', true],
|
|
|
|
'no checkout class' => ['details', false],
|
|
|
|
'unknown class' => ['unknown', false],
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Application\Controller\d3webauthnlogin::getIsOrderStep
|
|
|
|
* @dataProvider canGetIsOrderStepDataProvider
|
|
|
|
*/
|
|
|
|
public function canGetIsOrderStep($boolean)
|
|
|
|
{
|
|
|
|
/** @var d3webauthnlogin|MockObject $sut */
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut = $this->getMockBuilder($this->sutClassName)
|
2022-11-17 00:27:43 +01:00
|
|
|
->onlyMethods(['previousClassIsOrderStep'])
|
|
|
|
->getMock();
|
|
|
|
$sut->expects($this->atLeastOnce())->method('previousClassIsOrderStep')->willReturn($boolean);
|
|
|
|
|
|
|
|
$this->assertSame(
|
|
|
|
$boolean,
|
|
|
|
$this->callMethod(
|
|
|
|
$sut,
|
|
|
|
'getIsOrderStep'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function canGetIsOrderStepDataProvider(): array
|
|
|
|
{
|
|
|
|
return [
|
|
|
|
[true],
|
|
|
|
[false]
|
|
|
|
];
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Application\Controller\d3webauthnlogin::getBreadCrumb
|
|
|
|
*/
|
|
|
|
public function canGetBreadCrumb()
|
|
|
|
{
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut = oxNew($this->sutClassName);
|
|
|
|
|
2022-11-17 00:27:43 +01:00
|
|
|
$this->assertIsArray(
|
|
|
|
$this->callMethod(
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut,
|
2022-11-17 00:27:43 +01:00
|
|
|
'getBreadCrumb'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Application\Controller\d3webauthnlogin::d3GetSession
|
|
|
|
*/
|
|
|
|
public function canGetSession()
|
|
|
|
{
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut = oxNew($this->sutClassName);
|
|
|
|
|
2022-11-17 00:27:43 +01:00
|
|
|
$this->assertInstanceOf(
|
|
|
|
Session::class,
|
|
|
|
$this->callMethod(
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut,
|
2022-11-17 00:27:43 +01:00
|
|
|
'd3GetSession'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
|
|
|
* @covers \D3\Webauthn\Application\Controller\d3webauthnlogin::d3GetWebauthnObject
|
|
|
|
*/
|
|
|
|
public function canGetWebauthnObject()
|
|
|
|
{
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut = oxNew($this->sutClassName);
|
|
|
|
|
2022-11-17 00:27:43 +01:00
|
|
|
$this->assertInstanceOf(
|
|
|
|
Webauthn::class,
|
|
|
|
$this->callMethod(
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut,
|
2022-11-17 00:27:43 +01:00
|
|
|
'd3GetWebauthnObject'
|
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
2022-11-23 00:18:09 +01:00
|
|
|
* @covers \D3\Webauthn\Application\Controller\d3webauthnlogin::d3GetLoggerObject
|
2022-11-17 00:27:43 +01:00
|
|
|
*/
|
|
|
|
public function canGetLogger()
|
|
|
|
{
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut = oxNew($this->sutClassName);
|
|
|
|
|
2022-11-17 00:27:43 +01:00
|
|
|
$this->assertInstanceOf(
|
|
|
|
LoggerInterface::class,
|
|
|
|
$this->callMethod(
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut,
|
|
|
|
'd3GetLoggerObject'
|
2022-11-17 00:27:43 +01:00
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @return void
|
|
|
|
* @throws ReflectionException
|
2022-11-23 00:18:09 +01:00
|
|
|
* @covers \D3\Webauthn\Application\Controller\d3webauthnlogin::d3GetControllerClassNameResolver
|
2022-11-17 00:27:43 +01:00
|
|
|
*/
|
|
|
|
public function canGetClassNameResolver()
|
|
|
|
{
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut = oxNew($this->sutClassName);
|
|
|
|
|
2022-11-17 00:27:43 +01:00
|
|
|
$this->assertInstanceOf(
|
|
|
|
ControllerClassNameResolver::class,
|
|
|
|
$this->callMethod(
|
2022-11-23 00:18:09 +01:00
|
|
|
$sut,
|
|
|
|
'd3GetControllerClassNameResolver'
|
2022-11-17 00:27:43 +01:00
|
|
|
)
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|