instances added god may help
This commit is contained in:
29
tests/Service/User/UserServicesFactoryTest.php
Normal file
29
tests/Service/User/UserServicesFactoryTest.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace MintyPHP\Tests\Service\User;
|
||||
|
||||
use MintyPHP\Service\User\UserServicesFactory;
|
||||
use PHPUnit\Framework\TestCase;
|
||||
|
||||
class UserServicesFactoryTest extends TestCase
|
||||
{
|
||||
public function testFactoryCachesCoreInstances(): void
|
||||
{
|
||||
$factory = new UserServicesFactory();
|
||||
|
||||
$this->assertSame($factory->createUserAccountService(), $factory->createUserAccountService());
|
||||
$this->assertSame($factory->createUserAssignmentService(), $factory->createUserAssignmentService());
|
||||
$this->assertSame($factory->createUserTenantContextService(), $factory->createUserTenantContextService());
|
||||
$this->assertSame($factory->createUserPasswordService(), $factory->createUserPasswordService());
|
||||
$this->assertSame($factory->createUserReadRepository(), $factory->createUserReadRepository());
|
||||
$this->assertSame($factory->createUserWriteRepository(), $factory->createUserWriteRepository());
|
||||
$this->assertSame($factory->createUserListQueryRepository(), $factory->createUserListQueryRepository());
|
||||
$this->assertSame($factory->createUserSavedFilterRepository(), $factory->createUserSavedFilterRepository());
|
||||
$this->assertSame($factory->createUserTenantRepository(), $factory->createUserTenantRepository());
|
||||
$this->assertSame($factory->createUserRoleRepository(), $factory->createUserRoleRepository());
|
||||
$this->assertSame($factory->createUserDepartmentRepository(), $factory->createUserDepartmentRepository());
|
||||
$this->assertSame($factory->createUserPasswordPolicyService(), $factory->createUserPasswordPolicyService());
|
||||
$this->assertSame($factory->createUserAvatarService(), $factory->createUserAvatarService());
|
||||
$this->assertSame($factory->createUserSavedFilterService(), $factory->createUserSavedFilterService());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user