createMock(SettingRepositoryInterface::class); $settings->expects($this->any())->method('getValue')->with('app_title')->willReturn(null); $gateway = $this->createGateway($settings); $this->assertNull($gateway->getAppTitle()); } public function testGetAppTitleReturnsTrimmedValue(): void { $settings = $this->createMock(SettingRepositoryInterface::class); $settings->expects($this->any())->method('getValue')->with('app_title')->willReturn(' My App '); $gateway = $this->createGateway($settings); $this->assertSame('My App', $gateway->getAppTitle()); } public function testGetAppLocaleReturnsNullWhenNotSet(): void { $settings = $this->createMock(SettingRepositoryInterface::class); $settings->expects($this->any())->method('getValue')->with('app_locale')->willReturn(null); $gateway = $this->createGateway($settings); $this->assertNull($gateway->getAppLocale()); } public function testIsRegistrationEnabledDefaultsToTrue(): void { $settings = $this->createMock(SettingRepositoryInterface::class); $settings->expects($this->any())->method('getValue')->with('app_registration')->willReturn(null); $gateway = $this->createGateway($settings); $this->assertTrue($gateway->isRegistrationEnabled()); } public function testIsRegistrationEnabledReturnsFalseWhenDisabled(): void { $settings = $this->createMock(SettingRepositoryInterface::class); $settings->expects($this->any())->method('getValue')->with('app_registration')->willReturn('0'); $gateway = $this->createGateway($settings); $this->assertFalse($gateway->isRegistrationEnabled()); } }