mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-09-04 10:14:13 +08:00
This implements the basic structure that will be used for future unit, functional and acceptance tests.
39 lines
935 B
PHP
39 lines
935 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Codeception\Test\Unit;
|
|
use SuiteCRM\Core\Legacy\Authentication;
|
|
use SuiteCRM\Core\Legacy\AuthenticationService;
|
|
|
|
final class AuthenticationServiceTest extends Unit
|
|
{
|
|
/**
|
|
* @var AuthenticationService
|
|
*/
|
|
private $authenticationService;
|
|
|
|
|
|
protected function _before()
|
|
{
|
|
$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());
|
|
}
|
|
}
|