improve code
This commit is contained in:
parent
ca7fd769aa
commit
e9a1969c4c
@ -40,6 +40,9 @@
|
|||||||
"ext-soap": "*",
|
"ext-soap": "*",
|
||||||
"ext-PDO": "*"
|
"ext-PDO": "*"
|
||||||
},
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpstan/phpstan": "^1.8"
|
||||||
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"D3\\Webauthn\\": "../../../source/modules/d3/oxwebauthn"
|
"D3\\Webauthn\\": "../../../source/modules/d3/oxwebauthn"
|
||||||
|
13
phpstan.neon
Normal file
13
phpstan.neon
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
parameters:
|
||||||
|
scanFiles:
|
||||||
|
- src/IntelliSenseHelper.php
|
||||||
|
- ../../oxid-esales/oxideshop-ce/source/oxfunctions.php
|
||||||
|
paths:
|
||||||
|
- src
|
||||||
|
level: 5
|
||||||
|
phpVersion: 70400
|
||||||
|
ignoreErrors:
|
||||||
|
- '#Call to an undefined method OxidEsales\\Eshop\\Core\\Controller\\BaseController::getNavigationParams\(\)\.#'
|
||||||
|
- '#Call to an undefined method PHPUnit\\Framework\\MockObject\\MockObject::.*#'
|
||||||
|
- '#Return type \(array\) of method D3\\Webauthn\\Application\\Controller\\d3webauthnlogin::getBreadCrumb\(\) should be compatible with return type \(null\) of method OxidEsales\\EshopCommunity\\Application\\Controller\\FrontendController::getBreadCrumb\(\)#'
|
||||||
|
- '#Method D3\\Webauthn\\Application\\Model\\RelyingPartyEntity::getActiveShop\(\) should return OxidEsales\\Eshop\\Application\\Model\\Shop but returns oxShop.#'
|
@ -15,6 +15,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace D3\Webauthn\Application\Controller\Admin;
|
namespace D3\Webauthn\Application\Controller\Admin;
|
||||||
|
|
||||||
|
use Assert\AssertionFailedException;
|
||||||
use D3\TestingTools\Production\IsMockable;
|
use D3\TestingTools\Production\IsMockable;
|
||||||
use D3\Webauthn\Application\Model\Credential\PublicKeyCredential;
|
use D3\Webauthn\Application\Model\Credential\PublicKeyCredential;
|
||||||
use D3\Webauthn\Application\Model\Credential\PublicKeyCredentialList;
|
use D3\Webauthn\Application\Model\Credential\PublicKeyCredentialList;
|
||||||
@ -32,6 +33,7 @@ use OxidEsales\Eshop\Core\Utils;
|
|||||||
use OxidEsales\Eshop\Core\UtilsView;
|
use OxidEsales\Eshop\Core\UtilsView;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
|
use Throwable;
|
||||||
|
|
||||||
class d3user_webauthn extends AdminDetailsController
|
class d3user_webauthn extends AdminDetailsController
|
||||||
{
|
{
|
||||||
@ -52,7 +54,7 @@ class d3user_webauthn extends AdminDetailsController
|
|||||||
|
|
||||||
$soxId = $this->getEditObjectId();
|
$soxId = $this->getEditObjectId();
|
||||||
|
|
||||||
if (isset($soxId) && $soxId != "-1") {
|
if ($soxId != "-1") {
|
||||||
/** @var d3_User_Webauthn $oUser */
|
/** @var d3_User_Webauthn $oUser */
|
||||||
$oUser = $this->d3GetMockableOxNewObject(User::class);
|
$oUser = $this->d3GetMockableOxNewObject(User::class);
|
||||||
if ($oUser->load($soxId)) {
|
if ($oUser->load($soxId)) {
|
||||||
@ -79,7 +81,7 @@ class d3user_webauthn extends AdminDetailsController
|
|||||||
$this->setPageType( 'requestnew' );
|
$this->setPageType( 'requestnew' );
|
||||||
$this->setAuthnRegister();
|
$this->setAuthnRegister();
|
||||||
} catch (Exception|ContainerExceptionInterface|NotFoundExceptionInterface|DoctrineDriverException $e) {
|
} catch (Exception|ContainerExceptionInterface|NotFoundExceptionInterface|DoctrineDriverException $e) {
|
||||||
$this->d3GetMockableRegistryObject(UtilsView::class)->addErrorToDisplay($e);
|
$this->d3GetMockableRegistryObject(UtilsView::class)->addErrorToDisplay($e->getMessage());
|
||||||
$this->d3GetMockableLogger()->error($e->getMessage(), ['UserId' => $this->getEditObjectId()]);
|
$this->d3GetMockableLogger()->error($e->getMessage(), ['UserId' => $this->getEditObjectId()]);
|
||||||
$this->d3GetMockableLogger()->debug($e->getTraceAsString());
|
$this->d3GetMockableLogger()->debug($e->getTraceAsString());
|
||||||
$this->d3GetMockableRegistryObject(Utils::class)->redirect('index.php?cl=d3user_webauthn');
|
$this->d3GetMockableRegistryObject(Utils::class)->redirect('index.php?cl=d3user_webauthn');
|
||||||
@ -88,6 +90,8 @@ class d3user_webauthn extends AdminDetailsController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
|
* @throws AssertionFailedException
|
||||||
|
* @throws Throwable
|
||||||
*/
|
*/
|
||||||
public function saveAuthn(): void
|
public function saveAuthn(): void
|
||||||
{
|
{
|
||||||
@ -104,10 +108,14 @@ class d3user_webauthn extends AdminDetailsController
|
|||||||
$webauthn = $this->d3GetMockableOxNewObject(Webauthn::class);
|
$webauthn = $this->d3GetMockableOxNewObject(Webauthn::class);
|
||||||
$webauthn->saveAuthn($credential, Registry::getRequest()->getRequestEscapedParameter( 'keyname' ) );
|
$webauthn->saveAuthn($credential, Registry::getRequest()->getRequestEscapedParameter( 'keyname' ) );
|
||||||
}
|
}
|
||||||
} catch (WebauthnException|Exception|NotFoundExceptionInterface|ContainerExceptionInterface|DoctrineDriverException $e) {
|
} catch (WebauthnException $e) {
|
||||||
$this->d3GetMockableLogger()->error($e->getDetailedErrorMessage(), ['UserId' => $this->getEditObjectId()]);
|
$this->d3GetMockableLogger()->error($e->getDetailedErrorMessage(), ['UserId' => $this->getEditObjectId()]);
|
||||||
$this->d3GetMockableLogger()->debug($e->getTraceAsString());
|
$this->d3GetMockableLogger()->debug($e->getTraceAsString());
|
||||||
$this->d3GetMockableRegistryObject(UtilsView::class)->addErrorToDisplay($e);
|
$this->d3GetMockableRegistryObject(UtilsView::class)->addErrorToDisplay($e);
|
||||||
|
} catch (Exception|NotFoundExceptionInterface|ContainerExceptionInterface|DoctrineDriverException $e) {
|
||||||
|
$this->d3GetMockableLogger()->error($e->getMessage(), ['UserId' => $this->getEditObjectId()]);
|
||||||
|
$this->d3GetMockableLogger()->debug($e->getTraceAsString());
|
||||||
|
$this->d3GetMockableRegistryObject(UtilsView::class)->addErrorToDisplay($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace D3\Webauthn\Application\Controller;
|
namespace D3\Webauthn\Application\Controller;
|
||||||
|
|
||||||
|
use Assert\AssertionFailedException;
|
||||||
use D3\TestingTools\Production\IsMockable;
|
use D3\TestingTools\Production\IsMockable;
|
||||||
use D3\Webauthn\Application\Controller\Traits\accountTrait;
|
use D3\Webauthn\Application\Controller\Traits\accountTrait;
|
||||||
use D3\Webauthn\Application\Model\Credential\PublicKeyCredential;
|
use D3\Webauthn\Application\Model\Credential\PublicKeyCredential;
|
||||||
@ -30,6 +31,7 @@ use OxidEsales\Eshop\Core\SeoEncoder;
|
|||||||
use OxidEsales\Eshop\Core\UtilsView;
|
use OxidEsales\Eshop\Core\UtilsView;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
|
use Throwable;
|
||||||
|
|
||||||
class d3_account_webauthn extends AccountController
|
class d3_account_webauthn extends AccountController
|
||||||
{
|
{
|
||||||
@ -94,7 +96,6 @@ class d3_account_webauthn extends AccountController
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @throws WebauthnException
|
|
||||||
* @throws DoctrineDriverException
|
* @throws DoctrineDriverException
|
||||||
* @throws DoctrineException
|
* @throws DoctrineException
|
||||||
* @throws ContainerExceptionInterface
|
* @throws ContainerExceptionInterface
|
||||||
@ -113,10 +114,10 @@ class d3_account_webauthn extends AccountController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ContainerExceptionInterface
|
|
||||||
* @throws DoctrineDriverException
|
* @throws DoctrineDriverException
|
||||||
* @throws DoctrineException
|
* @throws DoctrineException
|
||||||
* @throws NotFoundExceptionInterface
|
* @throws AssertionFailedException
|
||||||
|
* @throws Throwable
|
||||||
*/
|
*/
|
||||||
public function saveAuthn(): void
|
public function saveAuthn(): void
|
||||||
{
|
{
|
||||||
@ -161,11 +162,19 @@ class d3_account_webauthn extends AccountController
|
|||||||
$iBaseLanguage = Registry::getLang()->getBaseLanguage();
|
$iBaseLanguage = Registry::getLang()->getBaseLanguage();
|
||||||
/** @var SeoEncoder $oSeoEncoder */
|
/** @var SeoEncoder $oSeoEncoder */
|
||||||
$oSeoEncoder = Registry::getSeoEncoder();
|
$oSeoEncoder = Registry::getSeoEncoder();
|
||||||
$aPath['title'] = Registry::getLang()->translateString('MY_ACCOUNT', $iBaseLanguage, false);
|
$aPath['title'] = Registry::getLang()->translateString(
|
||||||
|
'MY_ACCOUNT',
|
||||||
|
(int) $iBaseLanguage,
|
||||||
|
false
|
||||||
|
);
|
||||||
$aPath['link'] = $oSeoEncoder->getStaticUrl($this->getViewConfig()->getSelfLink() . "cl=account");
|
$aPath['link'] = $oSeoEncoder->getStaticUrl($this->getViewConfig()->getSelfLink() . "cl=account");
|
||||||
$aPaths[] = $aPath;
|
$aPaths[] = $aPath;
|
||||||
|
|
||||||
$aPath['title'] = Registry::getLang()->translateString('D3_WEBAUTHN_ACCOUNT', $iBaseLanguage, false);
|
$aPath['title'] = Registry::getLang()->translateString(
|
||||||
|
'D3_WEBAUTHN_ACCOUNT',
|
||||||
|
(int) $iBaseLanguage,
|
||||||
|
false
|
||||||
|
);
|
||||||
$aPath['link'] = $this->getLink();
|
$aPath['link'] = $this->getLink();
|
||||||
$aPaths[] = $aPath;
|
$aPaths[] = $aPath;
|
||||||
|
|
||||||
|
@ -145,7 +145,11 @@ class d3webauthnlogin extends FrontendController
|
|||||||
$aPaths = [];
|
$aPaths = [];
|
||||||
$aPath = [];
|
$aPath = [];
|
||||||
$iBaseLanguage = Registry::getLang()->getBaseLanguage();
|
$iBaseLanguage = Registry::getLang()->getBaseLanguage();
|
||||||
$aPath['title'] = Registry::getLang()->translateString('D3_WEBAUTHN_BREADCRUMB', $iBaseLanguage, false);
|
$aPath['title'] = Registry::getLang()->translateString(
|
||||||
|
'D3_WEBAUTHN_BREADCRUMB',
|
||||||
|
(int) $iBaseLanguage,
|
||||||
|
false
|
||||||
|
);
|
||||||
$aPath['link'] = $this->getLink();
|
$aPath['link'] = $this->getLink();
|
||||||
|
|
||||||
$aPaths[] = $aPath;
|
$aPaths[] = $aPath;
|
||||||
|
@ -72,11 +72,11 @@ class PublicKeyCredential extends BaseModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return false|string
|
* @return null|string
|
||||||
*/
|
*/
|
||||||
public function getCredentialId(): ?string
|
public function getCredentialId(): ?string
|
||||||
{
|
{
|
||||||
return base64_decode($this->__get($this->_getFieldLongName('credentialid'))->rawValue);
|
return base64_decode($this->__get($this->_getFieldLongName('credentialid'))->rawValue) ?: null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -108,11 +108,12 @@ class PublicKeyCredential extends BaseModel
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return false|PublicKeyCredentialSource
|
* @return null|PublicKeyCredentialSource
|
||||||
*/
|
*/
|
||||||
public function getCredential(): ?PublicKeyCredentialSource
|
public function getCredential(): ?PublicKeyCredentialSource
|
||||||
{
|
{
|
||||||
return unserialize(base64_decode($this->__get($this->_getFieldLongName('credential'))->rawValue));
|
return unserialize(base64_decode($this->__get($this->_getFieldLongName('credential'))->rawValue)) ?:
|
||||||
|
null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -158,6 +158,8 @@ class PublicKeyCredentialList extends ListModel implements PublicKeyCredentialSo
|
|||||||
*/
|
*/
|
||||||
public function saveCredentialSource(PublicKeyCredentialSource $publicKeyCredentialSource): void
|
public function saveCredentialSource(PublicKeyCredentialSource $publicKeyCredentialSource): void
|
||||||
{
|
{
|
||||||
$this->getBaseObject()->saveCredentialSource($publicKeyCredentialSource);
|
/** @var PublicKeyCredential $base */
|
||||||
|
$base = $this->getBaseObject();
|
||||||
|
$base->saveCredentialSource($publicKeyCredentialSource);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -107,7 +107,7 @@ class Webauthn
|
|||||||
public function getExistingCredentials(UserEntity $userEntity): array
|
public function getExistingCredentials(UserEntity $userEntity): array
|
||||||
{
|
{
|
||||||
// Get the list of authenticators associated to the user
|
// Get the list of authenticators associated to the user
|
||||||
/** @var PublicKeyCredentialList $credentialSourceRepository */
|
/** @var PublicKeyCredentialList $credentialList */
|
||||||
$credentialList = $this->d3GetMockableOxNewObject(PublicKeyCredentialList::class);
|
$credentialList = $this->d3GetMockableOxNewObject(PublicKeyCredentialList::class);
|
||||||
$credentialSources = $credentialList->findAllForUserEntity($userEntity);
|
$credentialSources = $credentialList->findAllForUserEntity($userEntity);
|
||||||
|
|
||||||
@ -249,7 +249,7 @@ class Webauthn
|
|||||||
/** @var User $user */
|
/** @var User $user */
|
||||||
$user = $this->d3GetMockableOxNewObject(User::class);
|
$user = $this->d3GetMockableOxNewObject(User::class);
|
||||||
$user->load($userId);
|
$user->load($userId);
|
||||||
/** @var UserEntity $userEntity */
|
|
||||||
return $this->d3GetMockableOxNewObject(UserEntity::class, $user);
|
return $this->d3GetMockableOxNewObject(UserEntity::class, $user);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,10 +33,10 @@ class WebauthnErrors
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $msg
|
* @param $msg
|
||||||
* @param null $type
|
* @param null|string $type
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function translateError($msg, $type = null): string
|
public function translateError(string $msg, string $type = null): string
|
||||||
{
|
{
|
||||||
$lang = $this->d3GetMockableRegistryObject(Language::class);
|
$lang = $this->d3GetMockableRegistryObject(Language::class);
|
||||||
$type = $type ? '_'.$type : null;
|
$type = $type ? '_'.$type : null;
|
||||||
@ -58,8 +58,7 @@ class WebauthnErrors
|
|||||||
return $lang->translateString('D3_WEBAUTHN_ERR_NOPUBKEYSUPPORT', null, true);
|
return $lang->translateString('D3_WEBAUTHN_ERR_NOPUBKEYSUPPORT', null, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (strtoupper($msg)) {
|
if (strtoupper($msg) === self::UNSECURECONNECTION) {
|
||||||
case self::UNSECURECONNECTION:
|
|
||||||
return $lang->translateString($msg);
|
return $lang->translateString($msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,6 @@ class WebauthnLogin
|
|||||||
* @param UserComponent $usrCmp
|
* @param UserComponent $usrCmp
|
||||||
* @param bool $setSessionCookie
|
* @param bool $setSessionCookie
|
||||||
* @return void
|
* @return void
|
||||||
* @throws WebauthnLoginErrorException
|
|
||||||
*/
|
*/
|
||||||
public function frontendLogin(UserComponent $usrCmp, bool $setSessionCookie = false)
|
public function frontendLogin(UserComponent $usrCmp, bool $setSessionCookie = false)
|
||||||
{
|
{
|
||||||
@ -132,13 +131,9 @@ class WebauthnLogin
|
|||||||
return;
|
return;
|
||||||
} catch (UserException $oEx) {
|
} catch (UserException $oEx) {
|
||||||
// for login component send exception text to a custom component (if defined)
|
// for login component send exception text to a custom component (if defined)
|
||||||
$myUtilsView->addErrorToDisplay($oEx, false, true, '', false);
|
$myUtilsView->addErrorToDisplay($oEx, false, true);
|
||||||
|
|
||||||
//return 'user';
|
|
||||||
} catch (CookieException $oEx) {
|
} catch (CookieException $oEx) {
|
||||||
$myUtilsView->addErrorToDisplay($oEx);
|
$myUtilsView->addErrorToDisplay($oEx);
|
||||||
|
|
||||||
//return 'user';
|
|
||||||
} catch (WebauthnException $e) {
|
} catch (WebauthnException $e) {
|
||||||
$myUtilsView->addErrorToDisplay($e);
|
$myUtilsView->addErrorToDisplay($e);
|
||||||
$this->d3GetMockableLogger()->error($e->getDetailedErrorMessage(), ['UserId' => $userId]);
|
$this->d3GetMockableLogger()->error($e->getDetailedErrorMessage(), ['UserId' => $userId]);
|
||||||
@ -146,8 +141,7 @@ class WebauthnLogin
|
|||||||
}
|
}
|
||||||
|
|
||||||
$user->logout();
|
$user->logout();
|
||||||
$exc = oxNew(WebauthnLoginErrorException::class);
|
throw oxNew(WebauthnLoginErrorException::class);
|
||||||
throw $exc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -301,7 +295,7 @@ class WebauthnLogin
|
|||||||
if ($iSubshop) {
|
if ($iSubshop) {
|
||||||
$session->setVariable("shp", $iSubshop);
|
$session->setVariable("shp", $iSubshop);
|
||||||
$session->setVariable('currentadminshop', $iSubshop);
|
$session->setVariable('currentadminshop', $iSubshop);
|
||||||
$this->d3GetMockableRegistryObject(Config::class)->setShopId($iSubshop);
|
$this->d3GetMockableRegistryObject(Config::class)->setShopId((string) $iSubshop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -331,10 +325,9 @@ class WebauthnLogin
|
|||||||
*/
|
*/
|
||||||
public function updateBasket(): void
|
public function updateBasket(): void
|
||||||
{
|
{
|
||||||
if ($oBasket = $this->d3GetMockableRegistryObject(Session::class)->getBasket()) {
|
$oBasket = $this->d3GetMockableRegistryObject(Session::class)->getBasket();
|
||||||
$oBasket->onUpdate();
|
$oBasket->onUpdate();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return bool
|
* @return bool
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
|
||||||
<html>
|
<html lang="de">
|
||||||
<head>
|
<head>
|
||||||
<title>[{oxmultilang ident="LOGIN_TITLE"}]</title>
|
<title>[{oxmultilang ident="LOGIN_TITLE"}]</title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=[{$charset}]">
|
<meta http-equiv="Content-Type" content="text/html; charset=[{$charset}]">
|
||||||
|
@ -151,8 +151,10 @@ class d3_webauthn_UserComponent extends d3_webauthn_UserComponent_parent
|
|||||||
$this->d3GetMockableRegistryObject(Request::class)->getRequestEscapedParameter('credential'),
|
$this->d3GetMockableRegistryObject(Request::class)->getRequestEscapedParameter('credential'),
|
||||||
$this->d3GetMockableRegistryObject(Request::class)->getRequestEscapedParameter('error')
|
$this->d3GetMockableRegistryObject(Request::class)->getRequestEscapedParameter('error')
|
||||||
);
|
);
|
||||||
$login->frontendLogin($this, (bool)$this->d3GetMockableRegistryObject(Request::class)
|
$login->frontendLogin(
|
||||||
->getRequestParameter('lgn_cook'));
|
$this,
|
||||||
|
(bool)$this->d3GetMockableRegistryObject(Request::class)->getRequestParameter('lgn_cook')
|
||||||
|
);
|
||||||
$this->_afterLogin($this->getUser());
|
$this->_afterLogin($this->getUser());
|
||||||
} catch (WebauthnGetException $e) {
|
} catch (WebauthnGetException $e) {
|
||||||
$this->d3GetMockableRegistryObject(UtilsView::class)->addErrorToDisplay($e);
|
$this->d3GetMockableRegistryObject(UtilsView::class)->addErrorToDisplay($e);
|
||||||
|
@ -47,7 +47,7 @@ class Actions
|
|||||||
/**
|
/**
|
||||||
* SQL statement, that will be executed only at the first time of module installation.
|
* SQL statement, that will be executed only at the first time of module installation.
|
||||||
*
|
*
|
||||||
* @var array
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $createCredentialSql =
|
protected $createCredentialSql =
|
||||||
"CREATE TABLE `d3wa_usercredentials` (
|
"CREATE TABLE `d3wa_usercredentials` (
|
||||||
@ -144,7 +144,7 @@ class Actions
|
|||||||
$oUtils->resetLanguageCache();
|
$oUtils->resetLanguageCache();
|
||||||
} catch (ContainerExceptionInterface|NotFoundExceptionInterface|ModuleConfigurationNotFoundException $e) {
|
} catch (ContainerExceptionInterface|NotFoundExceptionInterface|ModuleConfigurationNotFoundException $e) {
|
||||||
$this->d3GetMockableLogger()->error($e->getMessage(), [$this]);
|
$this->d3GetMockableLogger()->error($e->getMessage(), [$this]);
|
||||||
$this->d3GetMockableRegistryObject(UtilsView::class)->addErrorToDisplay($e);
|
$this->d3GetMockableRegistryObject(UtilsView::class)->addErrorToDisplay($e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,8 +230,6 @@ class Actions
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @return void
|
* @return void
|
||||||
* @throws DatabaseConnectionException
|
|
||||||
* @throws DatabaseErrorException
|
|
||||||
*/
|
*/
|
||||||
public function createSeoUrl()
|
public function createSeoUrl()
|
||||||
{
|
{
|
||||||
@ -243,7 +241,7 @@ class Actions
|
|||||||
'index.php?cl='.$this->stdClassName,
|
'index.php?cl='.$this->stdClassName,
|
||||||
$this->seo_de,
|
$this->seo_de,
|
||||||
'static',
|
'static',
|
||||||
0
|
false
|
||||||
);
|
);
|
||||||
$seoEncoder->addSeoEntry(
|
$seoEncoder->addSeoEntry(
|
||||||
'ff57646b47249ee33c6b672741ac371a',
|
'ff57646b47249ee33c6b672741ac371a',
|
||||||
@ -252,7 +250,7 @@ class Actions
|
|||||||
'index.php?cl='.$this->stdClassName,
|
'index.php?cl='.$this->stdClassName,
|
||||||
$this->seo_en,
|
$this->seo_en,
|
||||||
'static',
|
'static',
|
||||||
0
|
false
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,20 +16,8 @@ namespace D3\Webauthn\tests;
|
|||||||
use D3\ModCfg\Tests\additional_abstract;
|
use D3\ModCfg\Tests\additional_abstract;
|
||||||
use OxidEsales\Eshop\Core\Exception\StandardException;
|
use OxidEsales\Eshop\Core\Exception\StandardException;
|
||||||
|
|
||||||
include(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'd3webauthn_config.php');
|
|
||||||
|
|
||||||
class additional extends additional_abstract
|
class additional extends additional_abstract
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* additional constructor.
|
|
||||||
* @throws StandardException
|
|
||||||
*/
|
|
||||||
public function __construct()
|
|
||||||
{
|
|
||||||
if (D3WEBAUTHN_REQUIRE_MODCFG) {
|
|
||||||
$this->reactivateModCfg();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
oxNew(additional::class);
|
oxNew(additional::class);
|
||||||
|
@ -21,6 +21,7 @@ use D3\ModCfg\Application\Model\DependencyInjectionContainer\d3DicHandler;
|
|||||||
use D3\ModCfg\Tests\unit\d3ModCfgUnitTestCase;
|
use D3\ModCfg\Tests\unit\d3ModCfgUnitTestCase;
|
||||||
use Exception;
|
use Exception;
|
||||||
use OxidEsales\Eshop\Application\Model\Article;
|
use OxidEsales\Eshop\Application\Model\Article;
|
||||||
|
use OxidEsales\Eshop\Application\Model\Rights;
|
||||||
use OxidEsales\Eshop\Application\Model\User;
|
use OxidEsales\Eshop\Application\Model\User;
|
||||||
use OxidEsales\Eshop\Core\Model\BaseModel;
|
use OxidEsales\Eshop\Core\Model\BaseModel;
|
||||||
|
|
||||||
@ -61,7 +62,7 @@ abstract class integrationTestCase extends d3ModCfgUnitTestCase
|
|||||||
* @param bool $blAdmin
|
* @param bool $blAdmin
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function createObject($sClass, $sId, $aFields = [], $blAdmin = false)
|
public function createObject($sClass, $sId, array $aFields = [], bool $blAdmin = false)
|
||||||
{
|
{
|
||||||
/** @var BaseModel $oObject */
|
/** @var BaseModel $oObject */
|
||||||
$oObject = oxNew($sClass);
|
$oObject = oxNew($sClass);
|
||||||
@ -83,7 +84,7 @@ abstract class integrationTestCase extends d3ModCfgUnitTestCase
|
|||||||
* @param array $aFields
|
* @param array $aFields
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function createBaseModelObject($sTableName, $sId, $aFields = [])
|
public function createBaseModelObject($sTableName, $sId, array $aFields = [])
|
||||||
{
|
{
|
||||||
/** @var BaseModel $oObject */
|
/** @var BaseModel $oObject */
|
||||||
$oObject = oxNew(BaseModel::class);
|
$oObject = oxNew(BaseModel::class);
|
||||||
@ -98,7 +99,7 @@ abstract class integrationTestCase extends d3ModCfgUnitTestCase
|
|||||||
* @param array $aFields
|
* @param array $aFields
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function createArticle($sId, $aFields = [])
|
public function createArticle($sId, array $aFields = [])
|
||||||
{
|
{
|
||||||
$this->createObject(
|
$this->createObject(
|
||||||
Article::class,
|
Article::class,
|
||||||
@ -116,7 +117,7 @@ abstract class integrationTestCase extends d3ModCfgUnitTestCase
|
|||||||
* @param bool $blAdmin
|
* @param bool $blAdmin
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public function createUser($sId, $aFields = [], $blAdmin = false)
|
public function createUser($sId, array $aFields = [], bool $blAdmin = false)
|
||||||
{
|
{
|
||||||
$this->createObject(
|
$this->createObject(
|
||||||
User::class,
|
User::class,
|
||||||
@ -136,7 +137,7 @@ abstract class integrationTestCase extends d3ModCfgUnitTestCase
|
|||||||
/** @var BaseModel $oObject */
|
/** @var BaseModel $oObject */
|
||||||
$oObject = oxNew($sClass);
|
$oObject = oxNew($sClass);
|
||||||
if (method_exists($oObject, 'setRights')) {
|
if (method_exists($oObject, 'setRights')) {
|
||||||
$oObject->setRights(null);
|
$oObject->setRights(oxNew(Rights::class));
|
||||||
}
|
}
|
||||||
if ($oObject->exists($sId)) {
|
if ($oObject->exists($sId)) {
|
||||||
$oObject->delete($sId);
|
$oObject->delete($sId);
|
||||||
@ -156,7 +157,7 @@ abstract class integrationTestCase extends d3ModCfgUnitTestCase
|
|||||||
$oObject = oxNew(BaseModel::class);
|
$oObject = oxNew(BaseModel::class);
|
||||||
$oObject->init($sTableName);
|
$oObject->init($sTableName);
|
||||||
if (method_exists($oObject, 'setRights')) {
|
if (method_exists($oObject, 'setRights')) {
|
||||||
$oObject->setRights(null);
|
$oObject->setRights(oxNew(Rights::class));
|
||||||
}
|
}
|
||||||
if ($oObject->exists($sId)) {
|
if ($oObject->exists($sId)) {
|
||||||
$oObject->delete($sId);
|
$oObject->delete($sId);
|
||||||
|
@ -46,7 +46,7 @@ class passwordFrontendAuthTest extends integrationTestCase
|
|||||||
'oxactive' => 1,
|
'oxactive' => 1,
|
||||||
'oxrights' => 'user',
|
'oxrights' => 'user',
|
||||||
'oxshopid' => 2,
|
'oxshopid' => 2,
|
||||||
'oxusername' => 'wrongshop@user.localhost',
|
'oxusername' => 'wrongshop_fe@user.localhost',
|
||||||
'oxpassword' => '$2y$10$b3O5amXZVMGGZbL4X10TIOHiOwEkq3C0ofObuTgHAS4Io0uMLauUS', // 123456
|
'oxpassword' => '$2y$10$b3O5amXZVMGGZbL4X10TIOHiOwEkq3C0ofObuTgHAS4Io0uMLauUS', // 123456
|
||||||
'oxstreet' => __CLASS__
|
'oxstreet' => __CLASS__
|
||||||
]
|
]
|
||||||
@ -81,7 +81,7 @@ class passwordFrontendAuthTest extends integrationTestCase
|
|||||||
$_POST['lgn_usr'] = $username;
|
$_POST['lgn_usr'] = $username;
|
||||||
$_POST['lgn_pwd'] = $password;
|
$_POST['lgn_pwd'] = $password;
|
||||||
|
|
||||||
/** @var AccountController $login */
|
/** @var AccountController $controller */
|
||||||
$controller = oxNew(AccountController::class);
|
$controller = oxNew(AccountController::class);
|
||||||
$controller->init();
|
$controller->init();
|
||||||
/** @var d3_webauthn_UserComponent $component */
|
/** @var d3_webauthn_UserComponent $component */
|
||||||
@ -104,7 +104,7 @@ class passwordFrontendAuthTest extends integrationTestCase
|
|||||||
'not existing account' => ['unknown@user.localhost', '123456', 'user'],
|
'not existing account' => ['unknown@user.localhost', '123456', 'user'],
|
||||||
'missing password' => ['noadmin@user.localhost', null, 'user'],
|
'missing password' => ['noadmin@user.localhost', null, 'user'],
|
||||||
'inactive account' => ['inactive@user.localhost', '123456', 'user'],
|
'inactive account' => ['inactive@user.localhost', '123456', 'user'],
|
||||||
'wrong shop account' => ['wrongshop@user.localhost', '123456', 'user'],
|
'wrong shop account' => ['wrongshop_fe@user.localhost', '123456', 'user'],
|
||||||
'account ok' => ['noadmin@user.localhost', '123456', 'payment'],
|
'account ok' => ['noadmin@user.localhost', '123456', 'payment'],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -91,10 +91,13 @@ class PublicKeyCredentialListTest extends UnitTestCase
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($doCreate) {
|
/** @var PublicKeyCredentialSource|MockObject $pkcsMock */
|
||||||
$pkcsMock = $this->getMockBuilder(PublicKeyCredentialSource::class)
|
$pkcsMock = $this->getMockBuilder(PublicKeyCredentialSource::class)
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
||||||
|
if ($doCreate) {
|
||||||
|
/** @var PublicKeyCredential|MockObject $pkc */
|
||||||
$pkc = $this->getMockBuilder(PublicKeyCredential::class)
|
$pkc = $this->getMockBuilder(PublicKeyCredential::class)
|
||||||
->onlyMethods(['allowDerivedDelete'])
|
->onlyMethods(['allowDerivedDelete'])
|
||||||
->getMock();
|
->getMock();
|
||||||
@ -169,10 +172,11 @@ class PublicKeyCredentialListTest extends UnitTestCase
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($doCreate) {
|
|
||||||
$pkcsMock = $this->getMockBuilder(PublicKeyCredentialSource::class)
|
$pkcsMock = $this->getMockBuilder(PublicKeyCredentialSource::class)
|
||||||
->disableOriginalConstructor()
|
->disableOriginalConstructor()
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
||||||
|
if ($doCreate) {
|
||||||
foreach ($oxids as $oxid) {
|
foreach ($oxids as $oxid) {
|
||||||
$pkc = $this->getMockBuilder(PublicKeyCredential::class)
|
$pkc = $this->getMockBuilder(PublicKeyCredential::class)
|
||||||
->onlyMethods(['allowDerivedDelete'])
|
->onlyMethods(['allowDerivedDelete'])
|
||||||
|
@ -18,6 +18,7 @@ namespace D3\Webauthn\tests\unit\Application\Model\Exceptions;
|
|||||||
use D3\TestingTools\Development\CanAccessRestricted;
|
use D3\TestingTools\Development\CanAccessRestricted;
|
||||||
use D3\Webauthn\Application\Model\Exceptions\WebauthnException;
|
use D3\Webauthn\Application\Model\Exceptions\WebauthnException;
|
||||||
use D3\Webauthn\Application\Model\WebauthnErrors;
|
use D3\Webauthn\Application\Model\WebauthnErrors;
|
||||||
|
use Exception;
|
||||||
use OxidEsales\TestingLibrary\UnitTestCase;
|
use OxidEsales\TestingLibrary\UnitTestCase;
|
||||||
use PHPUnit\Framework\MockObject\MockObject;
|
use PHPUnit\Framework\MockObject\MockObject;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
@ -34,8 +35,8 @@ class WebauthnExceptionTest extends UnitTestCase
|
|||||||
*/
|
*/
|
||||||
public function canConstruct()
|
public function canConstruct()
|
||||||
{
|
{
|
||||||
/** @var \Exception|MockObject $previousMock */
|
/** @var Exception|MockObject $previousMock */
|
||||||
$previousMock = $this->getMockBuilder(\Exception::class)
|
$previousMock = $this->getMockBuilder(Exception::class)
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
||||||
/** @var WebauthnErrors|MockObject $translatorMock */
|
/** @var WebauthnErrors|MockObject $translatorMock */
|
||||||
|
@ -26,6 +26,7 @@ use OxidEsales\Eshop\Core\UtilsServer;
|
|||||||
use OxidEsales\TestingLibrary\UnitTestCase;
|
use OxidEsales\TestingLibrary\UnitTestCase;
|
||||||
use PHPUnit\Framework\MockObject\MockObject;
|
use PHPUnit\Framework\MockObject\MockObject;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
|
use stdClass;
|
||||||
|
|
||||||
class WebauthnAfterLoginTest extends UnitTestCase
|
class WebauthnAfterLoginTest extends UnitTestCase
|
||||||
{
|
{
|
||||||
@ -115,6 +116,7 @@ class WebauthnAfterLoginTest extends UnitTestCase
|
|||||||
* @param $requestLang
|
* @param $requestLang
|
||||||
* @param $sessionLang
|
* @param $sessionLang
|
||||||
* @param $expectedLang
|
* @param $expectedLang
|
||||||
|
* @param $expectedAbbr
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
* @dataProvider canChangeLanguageDataProvider
|
* @dataProvider canChangeLanguageDataProvider
|
||||||
@ -189,7 +191,7 @@ class WebauthnAfterLoginTest extends UnitTestCase
|
|||||||
*/
|
*/
|
||||||
public function getConfiguredLanguageStub(): array
|
public function getConfiguredLanguageStub(): array
|
||||||
{
|
{
|
||||||
$de_1 = oxNew(\stdClass::class);
|
$de_1 = oxNew(stdClass::class);
|
||||||
$de_1->id = 0;
|
$de_1->id = 0;
|
||||||
$de_1->oxid = 'de';
|
$de_1->oxid = 'de';
|
||||||
$de_1->abbr = 'de';
|
$de_1->abbr = 'de';
|
||||||
@ -198,7 +200,7 @@ class WebauthnAfterLoginTest extends UnitTestCase
|
|||||||
$de_1->sort = '1';
|
$de_1->sort = '1';
|
||||||
$de_1->selected = 0;
|
$de_1->selected = 0;
|
||||||
|
|
||||||
$en_2 = oxNew(\stdClass::class);
|
$en_2 = oxNew(stdClass::class);
|
||||||
$en_2->id = 1;
|
$en_2->id = 1;
|
||||||
$en_2->oxid = 'en';
|
$en_2->oxid = 'en';
|
||||||
$en_2->abbr = 'en';
|
$en_2->abbr = 'en';
|
||||||
|
@ -987,25 +987,23 @@ class WebauthnLoginTest extends UnitTestCase
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
* @param $canGetBasket
|
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
* @dataProvider canUpdateBasketDataProvider
|
|
||||||
* @covers \D3\Webauthn\Application\Model\WebauthnLogin::updateBasket
|
* @covers \D3\Webauthn\Application\Model\WebauthnLogin::updateBasket
|
||||||
*/
|
*/
|
||||||
public function canUpdateBasket($canGetBasket)
|
public function canUpdateBasket()
|
||||||
{
|
{
|
||||||
/** @var Basket|MockObject $basketMock */
|
/** @var Basket|MockObject $basketMock */
|
||||||
$basketMock = $this->getMockBuilder(Basket::class)
|
$basketMock = $this->getMockBuilder(Basket::class)
|
||||||
->onlyMethods(['onUpdate'])
|
->onlyMethods(['onUpdate'])
|
||||||
->getMock();
|
->getMock();
|
||||||
$basketMock->expects($this->exactly((int) $canGetBasket))->method('onUpdate');
|
$basketMock->expects($this->once())->method('onUpdate');
|
||||||
|
|
||||||
/** @var Session|MockObject $sessionMock */
|
/** @var Session|MockObject $sessionMock */
|
||||||
$sessionMock = $this->getMockBuilder(Session::class)
|
$sessionMock = $this->getMockBuilder(Session::class)
|
||||||
->onlyMethods(['getBasket'])
|
->onlyMethods(['getBasket'])
|
||||||
->getMock();
|
->getMock();
|
||||||
$sessionMock->method('getBasket')->willReturn($canGetBasket ? $basketMock : null);
|
$sessionMock->method('getBasket')->willReturn($basketMock);
|
||||||
|
|
||||||
/** @var WebauthnLogin|MockObject $sut */
|
/** @var WebauthnLogin|MockObject $sut */
|
||||||
$sut = $this->getMockBuilder(WebauthnLogin::class)
|
$sut = $this->getMockBuilder(WebauthnLogin::class)
|
||||||
@ -1030,17 +1028,6 @@ class WebauthnLoginTest extends UnitTestCase
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return array
|
|
||||||
*/
|
|
||||||
public function canUpdateBasketDataProvider(): array
|
|
||||||
{
|
|
||||||
return [
|
|
||||||
'can get basket' => [true],
|
|
||||||
'cant get basket' => [false],
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
* @return void
|
* @return void
|
||||||
|
@ -24,7 +24,6 @@ use D3\Webauthn\Application\Model\WebauthnLogin;
|
|||||||
use D3\Webauthn\Modules\Application\Component\d3_webauthn_UserComponent;
|
use D3\Webauthn\Modules\Application\Component\d3_webauthn_UserComponent;
|
||||||
use D3\Webauthn\Modules\Application\Component\d3_webauthn_UserComponent_parent;
|
use D3\Webauthn\Modules\Application\Component\d3_webauthn_UserComponent_parent;
|
||||||
use OxidEsales\Eshop\Application\Component\UserComponent;
|
use OxidEsales\Eshop\Application\Component\UserComponent;
|
||||||
use OxidEsales\Eshop\Application\Controller\Admin\LoginController;
|
|
||||||
use OxidEsales\Eshop\Application\Model\User;
|
use OxidEsales\Eshop\Application\Model\User;
|
||||||
use OxidEsales\Eshop\Core\Controller\BaseController;
|
use OxidEsales\Eshop\Core\Controller\BaseController;
|
||||||
use OxidEsales\Eshop\Core\Registry;
|
use OxidEsales\Eshop\Core\Registry;
|
||||||
@ -68,6 +67,7 @@ class UserComponentWebauthnTest extends UnitTestCase
|
|||||||
* @param $canUseWebauthn
|
* @param $canUseWebauthn
|
||||||
* @param $loggedin
|
* @param $loggedin
|
||||||
* @param $setVariableCount
|
* @param $setVariableCount
|
||||||
|
* @param $doRedirect
|
||||||
* @return void
|
* @return void
|
||||||
* @throws ReflectionException
|
* @throws ReflectionException
|
||||||
* @dataProvider canCheckloginDataProvider
|
* @dataProvider canCheckloginDataProvider
|
||||||
|
@ -53,7 +53,6 @@ trait CheckoutTestTrait
|
|||||||
/**
|
/**
|
||||||
* @test
|
* @test
|
||||||
* @param $hasUser
|
* @param $hasUser
|
||||||
* @param $userId
|
|
||||||
* @param $isActive
|
* @param $isActive
|
||||||
* @param $sessionAuth
|
* @param $sessionAuth
|
||||||
* @param $expected
|
* @param $expected
|
||||||
@ -115,13 +114,20 @@ trait CheckoutTestTrait
|
|||||||
'getUser'
|
'getUser'
|
||||||
);
|
);
|
||||||
|
|
||||||
$sut->setUser(null);
|
$sut->setUser(oxNew(User::class));
|
||||||
|
|
||||||
if ($expected === 'parent') {
|
if ($expected === 'parent') {
|
||||||
$this->assertSame($return, $hasUser ? $this->userFixture : false);
|
$this->assertSame( $return, $hasUser ? $this->userFixture : false);
|
||||||
} else {
|
} else {
|
||||||
$this->assertSame($return, $expected);
|
$this->assertSame($return, $expected);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// reset cache
|
||||||
|
$this->setValue(
|
||||||
|
$sut,
|
||||||
|
'_oActUser',
|
||||||
|
null
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,6 +17,7 @@ namespace D3\Webauthn\tests\unit\Setup;
|
|||||||
|
|
||||||
use D3\TestingTools\Development\CanAccessRestricted;
|
use D3\TestingTools\Development\CanAccessRestricted;
|
||||||
use D3\Webauthn\Setup\Actions;
|
use D3\Webauthn\Setup\Actions;
|
||||||
|
use Exception;
|
||||||
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
use OxidEsales\Eshop\Application\Controller\FrontendController;
|
||||||
use OxidEsales\Eshop\Core\Database\Adapter\DatabaseInterface;
|
use OxidEsales\Eshop\Core\Database\Adapter\DatabaseInterface;
|
||||||
use OxidEsales\Eshop\Core\Database\Adapter\Doctrine\Database;
|
use OxidEsales\Eshop\Core\Database\Adapter\Doctrine\Database;
|
||||||
@ -474,7 +475,7 @@ class ActionsTest extends UnitTestCase
|
|||||||
$sut->method('hasSeoUrl')->willReturn($hasSeoUrl);
|
$sut->method('hasSeoUrl')->willReturn($hasSeoUrl);
|
||||||
$sut->expects($hasSeoUrl ? $this->never() : $this->once())->method('createSeoUrl')->will(
|
$sut->expects($hasSeoUrl ? $this->never() : $this->once())->method('createSeoUrl')->will(
|
||||||
$throwException ?
|
$throwException ?
|
||||||
$this->throwException(oxNew(\Exception::class)) :
|
$this->throwException(oxNew(Exception::class)) :
|
||||||
$this->returnValue(true)
|
$this->returnValue(true)
|
||||||
);
|
);
|
||||||
$sut->method('d3GetMockableLogger')->willReturn($loggerMock);
|
$sut->method('d3GetMockableLogger')->willReturn($loggerMock);
|
||||||
|
Loading…
Reference in New Issue
Block a user