mirror of
https://github.com/FOSSBilling/FOSSBilling.git
synced 2026-12-03 13:49:56 +09:00
* PHPUnit test-legacy cleanup Refactor and cleanup the legacy PHPUnit tests. * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
29 lines
719 B
PHP
29 lines
719 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Box\Mod\Page;
|
|
|
|
use PHPUnit\Framework\Attributes\Group;
|
|
|
|
#[Group('Core')]
|
|
final class ServiceTest extends \BBTestCase
|
|
{
|
|
public function testGetPairs(): void
|
|
{
|
|
$service = new Service();
|
|
|
|
$themeService = $this->createMock(\Box\Mod\Theme\Service::class);
|
|
$themeService->expects($this->atLeastOnce())
|
|
->method('getCurrentClientAreaThemeCode')
|
|
->willReturn('huraga');
|
|
|
|
$di = $this->getDi();
|
|
$di['mod_service'] = $di->protect(fn (): \PHPUnit\Framework\MockObject\MockObject => $themeService);
|
|
|
|
$service->setDi($di);
|
|
$result = $service->getPairs();
|
|
$this->assertIsArray($result);
|
|
}
|
|
}
|