File tree Expand file tree Collapse file tree
tests/WebFiori/Framework/Tests/Theme Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -155,14 +155,11 @@ public function testRegisterNonThemeClass() {
155155 * @test
156156 */
157157 public function testRegisterDuplicate () {
158- $ themes = ThemeManager::getRegisteredThemes ();
159- if (count ($ themes ) > 0 ) {
160- $ firstTheme = array_values ($ themes )[0 ];
161- $ this ->expectException (\WebFiori \Framework \Exceptions \NoSuchThemeException::class);
162- ThemeManager::register ($ firstTheme );
163- } else {
164- $ this ->markTestSkipped ('No themes registered ' );
158+ if (!ThemeManager::isThemeRegistered ('New Super Theme ' )) {
159+ ThemeManager::register (new NewFTestTheme ());
165160 }
161+ $ this ->expectException (\WebFiori \Framework \Exceptions \NoSuchThemeException::class);
162+ ThemeManager::register (new NewFTestTheme ());
166163 }
167164 /**
168165 * @test
You can’t perform that action at this time.
0 commit comments