2019-08-11 00:33:59 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
2022-09-26 15:22:26 +02:00
|
|
|
* For the full copyright and license information, please view the LICENSE
|
|
|
|
* file that was distributed with this source code.
|
2019-08-11 00:33:59 +02:00
|
|
|
*
|
2022-09-26 15:22:26 +02:00
|
|
|
* https://www.d3data.de
|
2019-08-11 00:33:59 +02:00
|
|
|
*
|
|
|
|
* @copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
2022-09-26 15:22:26 +02:00
|
|
|
* @author D3 Data Development - Daniel Seifert <info@shopmodule.com>
|
|
|
|
* @link https://www.oxidmodule.com
|
2019-08-11 00:33:59 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
namespace D3\Totp\tests\unit\Application\Model\Exceptions;
|
|
|
|
|
|
|
|
use D3\Totp\Application\Model\Exceptions\d3totp_wrongOtpException;
|
|
|
|
use D3\Totp\tests\unit\d3TotpUnitTestCase;
|
|
|
|
use ReflectionException;
|
|
|
|
|
|
|
|
class d3totp_wrongOtpExceptionTest extends d3TotpUnitTestCase
|
|
|
|
{
|
|
|
|
/** @var d3totp_wrongOtpException */
|
|
|
|
protected $_oModel;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* setup basic requirements
|
|
|
|
*/
|
2022-09-28 00:08:36 +02:00
|
|
|
public function setUp(): void
|
2019-08-11 00:33:59 +02:00
|
|
|
{
|
|
|
|
parent::setUp();
|
|
|
|
|
|
|
|
$this->_oModel = oxNew(d3totp_wrongOtpException::class);
|
|
|
|
}
|
|
|
|
|
2022-09-28 00:08:36 +02:00
|
|
|
public function tearDown(): void
|
2019-08-11 00:33:59 +02:00
|
|
|
{
|
|
|
|
parent::tearDown();
|
|
|
|
|
|
|
|
unset($this->_oModel);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @test
|
|
|
|
* @throws ReflectionException
|
2022-09-30 00:06:20 +02:00
|
|
|
* @covers \D3\Totp\Application\Model\Exceptions\d3totp_wrongOtpException::__construct
|
2019-08-11 00:33:59 +02:00
|
|
|
*/
|
|
|
|
public function constructorHasRightDefaultMessage()
|
|
|
|
{
|
|
|
|
$this->_oModel = oxNew(d3totp_wrongOtpException::class);
|
|
|
|
$this->assertSame(
|
|
|
|
'D3_TOTP_ERROR_UNVALID',
|
|
|
|
$this->callMethod($this->_oModel, 'getMessage')
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|