Files
piratepoet/mailpoet/tests/integration/EmailEditor/Engine/SettingsControllerTest.php
Rostislav Wolny e8bb1b5ac0 Refactor font family rendering using CSS inlining
We don't reset font family on any level, so there is no need to
bubble the setting using a preprocessor and render the inline styles
explicitly in every block.

In this commit, I change how font-family settings are distributed/rendered
in the email renderer. In the new approach, we rely on class names defining font-family
and a generated CSS sheet with font-family definitions.
We apply the font-family CSS by inlining CSS rules for families in the later phase of
rendering after all individual blocks are processed.
[MAILPOET-5740]
2024-01-23 16:47:48 +01:00

20 lines
629 B
PHP

<?php declare(strict_types = 1);
namespace MailPoet\EmailEditor\Engine;
class SettingsControllerTest extends \MailPoetTest {
/** @var SettingsController */
private $settingsController;
public function _before() {
parent::_before();
$this->settingsController = $this->diContainer->get(SettingsController::class);
}
public function testItGeneratesCssStylesForThemeWithFontFamilies() {
$css = $this->settingsController->getStylesheetForRendering();
verify($css)->stringContainsString('.has-system-sans-serif-font-family');
verify($css)->stringContainsString('.has-system-Serif-font-family');
}
}