Skip to content

Commit

Permalink
MNT Fix unit test (#603)
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli authored Sep 30, 2024
1 parent 06d9a71 commit 3939401
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit 3939401

Please sign in to comment.