MNT Fix unit test (#603)

This commit is contained in:
Guy Sartorelli 2024-09-30 18:08:11 +13:00 committed by GitHub
parent 06d9a713e5
commit 393940195d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -11,7 +11,7 @@ use PHPUnit\Framework\Attributes\DataProvider;
class ThemeResolverTest extends SapphireTest
{
protected $themeList = [
protected static array $themeList = [
'$public',
'custom',
'main',
@ -24,7 +24,7 @@ class ThemeResolverTest extends SapphireTest
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()
@ -32,7 +32,7 @@ class ThemeResolverTest extends SapphireTest
$subsite = new Subsite();
$resolver = new ThemeResolver();
$this->assertSame($this->themeList, $resolver->getThemeList($subsite));
$this->assertSame(static::$themeList, $resolver->getThemeList($subsite));
}
public function testSubsiteWithCustomThemePrependsToList()
@ -42,7 +42,7 @@ class ThemeResolverTest extends SapphireTest
$resolver = new ThemeResolver();
$expected = array_merge(['subsite'], $this->themeList);
$expected = array_merge(['subsite'], static::$themeList);
$this->assertSame($expected, $resolver->getThemeList($subsite));
}
@ -135,7 +135,7 @@ class ThemeResolverTest extends SapphireTest
SSViewer::DEFAULT_THEME,
]],
'other',
array_merge(['other'], $this->themeList)
array_merge(['other'], static::$themeList)
],
];
}