2021-03-30 19:12:01 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
2020-01-22 17:12:56 +00:00
|
|
|
use Codeception\Test\Unit;
|
2021-03-30 19:12:01 +01:00
|
|
|
use SuiteCRM\Core\Legacy\Authentication;
|
2019-12-23 17:13:46 +00:00
|
|
|
use SuiteCRM\Core\Legacy\AuthenticationService;
|
2021-03-30 19:12:01 +01:00
|
|
|
|
2020-01-22 17:12:56 +00:00
|
|
|
final class AuthenticationServiceTest extends Unit
|
2021-03-30 19:12:01 +01:00
|
|
|
{
|
2020-01-22 17:12:56 +00:00
|
|
|
/**
|
|
|
|
* @var AuthenticationService
|
|
|
|
*/
|
|
|
|
private $authenticationService;
|
2019-12-23 17:13:46 +00:00
|
|
|
|
2020-01-22 17:12:56 +00:00
|
|
|
|
|
|
|
protected function _before()
|
2021-03-30 19:12:01 +01:00
|
|
|
{
|
|
|
|
$this->authenticationService = new AuthenticationService();
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testGetName(): void
|
|
|
|
{
|
|
|
|
$this->assertSame('users.authentication', $this->authenticationService->getName());
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testGetDescription(): void
|
|
|
|
{
|
|
|
|
$this->assertSame(
|
|
|
|
'This service will deal with legacy authentication',
|
|
|
|
$this->authenticationService->getDescription()
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
public function testCreateService(): void
|
|
|
|
{
|
|
|
|
$this->assertInstanceOf(Authentication::class, $this->authenticationService->createService());
|
|
|
|
}
|
|
|
|
}
|