/** * @return array */ public function getThemeSettings() { $theme = $this->themeContext->getTheme(); if (null === $theme) { return []; } return $this->themeSettingsManager->load($theme); }
function it_returns_loaded_theme_settings(ThemeContextInterface $themeContext, ThemeSettingsManagerInterface $themeSettingsManager, ThemeInterface $theme, SettingsInterface $settings) { $themeContext->getTheme()->willReturn($theme); $themeSettingsManager->load($theme)->willReturn($settings); $this->getThemeSettings()->shouldReturn($settings); }