Files
FOSSBilling/tests-legacy/modules/Page/ServiceTest.php
T
Adam DaleyandCopilot a0b3158b30 PHPUnit test-legacy refactor and cleanup (#3144)
* 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>
2026-01-13 17:32:09 +00:00

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);
}
}