Update Theme_Controller_Test, add case for loading theme.json file

MAILPOET-6043
This commit is contained in:
Oluwaseun Olorunsola
2024-11-28 15:46:20 +01:00
committed by Rostislav Wolný
parent 5d6d7eba57
commit 64b550e27d

View File

@@ -27,6 +27,19 @@ class Theme_Controller_Test extends \MailPoetTest {
$this->theme_controller = $this->di_container->get( Theme_Controller::class );
}
/**
* Test it get the theme json
*
* @return void
*/
public function testItGetThemeJson(): void {
$theme_json = $this->theme_controller->get_theme();
$theme_settings = $theme_json->get_settings();
verify( $theme_settings['layout']['contentSize'] )->equals( '660px' ); // from email editor theme.json file.
verify( $theme_settings['spacing']['margin'] )->false();
verify( $theme_settings['typography']['dropCap'] )->false();
}
/**
* Test it generates css styles for renderer
*/