instances added god may help

This commit is contained in:
2026-02-23 12:58:19 +01:00
parent 25370a1a55
commit 99db252f60
290 changed files with 9858 additions and 4914 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace MintyPHP\Tests\Service\Settings;
use MintyPHP\Service\Settings\SettingGateway;
use PHPUnit\Framework\TestCase;
class SettingGatewayTest extends TestCase
{
public function testGetDefaultTenantIdDelegatesToService(): void
{
$settingService = $this->createMock('MintyPHP\\Service\\Settings\\SettingService');
$settingService->expects($this->once())
->method('getDefaultTenantId')
->willReturn(42);
$gateway = new SettingGateway($settingService);
$this->assertSame(42, $gateway->getDefaultTenantId());
}
public function testSetDefaultRoleIdDelegatesToService(): void
{
$settingService = $this->createMock('MintyPHP\\Service\\Settings\\SettingService');
$settingService->expects($this->once())
->method('setDefaultRoleId')
->with(7, null)
->willReturn(true);
$gateway = new SettingGateway($settingService);
$this->assertTrue($gateway->setDefaultRoleId(7));
}
}