Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT Fix unit test #603

Merged
merged 1 commit into from
Sep 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions tests/php/Service/ThemeResolverTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class ThemeResolverTest extends SapphireTest
{
protected $themeList = [
protected static array $themeList = [
'$public',
'custom',
'main',
Expand All @@ -24,15 +24,15 @@ protected function setUp(): void
parent::setUp();

// Setup known theme config
Config::modify()->set(SSViewer::class, 'themes', $this->themeList);
Config::modify()->set(SSViewer::class, 'themes', static::$themeList);
}

public function testSubsiteWithoutThemeReturnsDefaultThemeList()
{
$subsite = new Subsite();
$resolver = new ThemeResolver();

$this->assertSame($this->themeList, $resolver->getThemeList($subsite));
$this->assertSame(static::$themeList, $resolver->getThemeList($subsite));
}

public function testSubsiteWithCustomThemePrependsToList()
Expand All @@ -42,7 +42,7 @@ public function testSubsiteWithCustomThemePrependsToList()

$resolver = new ThemeResolver();

$expected = array_merge(['subsite'], $this->themeList);
$expected = array_merge(['subsite'], static::$themeList);

$this->assertSame($expected, $resolver->getThemeList($subsite));
}
Expand Down Expand Up @@ -135,7 +135,7 @@ public static function customThemeDefinitionsAreRespectedProvider()
SSViewer::DEFAULT_THEME,
]],
'other',
array_merge(['other'], $this->themeList)
array_merge(['other'], static::$themeList)
],
];
}
Expand Down
Loading