From 851920926889e712be428f6c4b0317ec0b45d524 Mon Sep 17 00:00:00 2001 From: Guy Sartorelli Date: Mon, 30 Sep 2024 15:17:46 +1300 Subject: [PATCH] MNT Fix unit test --- tests/php/Service/ThemeResolverTest.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/php/Service/ThemeResolverTest.php b/tests/php/Service/ThemeResolverTest.php index 67eea1b8..04720ac1 100644 --- a/tests/php/Service/ThemeResolverTest.php +++ b/tests/php/Service/ThemeResolverTest.php @@ -11,7 +11,7 @@ class ThemeResolverTest extends SapphireTest { - protected $themeList = [ + protected static array $themeList = [ '$public', 'custom', 'main', @@ -24,7 +24,7 @@ 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() @@ -32,7 +32,7 @@ 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() @@ -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)); } @@ -135,7 +135,7 @@ public static function customThemeDefinitionsAreRespectedProvider() SSViewer::DEFAULT_THEME, ]], 'other', - array_merge(['other'], $this->themeList) + array_merge(['other'], static::$themeList) ], ]; }