Migrate email editor theme-controller to WP Coding Standard

[MAILPOET-6240]
This commit is contained in:
Jan Lysý
2024-10-16 18:02:09 +02:00
committed by Jan Lysý
parent ecbd2f150d
commit fba5482cd2
11 changed files with 215 additions and 139 deletions

View File

@@ -24,7 +24,7 @@ class Variables_Postprocessor_Test extends \MailPoetUnitTest {
'--wp--preset--spacing--20' => '20px',
'--wp--preset--spacing--30' => '30px',
];
$this->themeControllerMock->method('getVariablesValuesMap')->willReturn($variablesMap);
$this->themeControllerMock->method('get_variables_values_map')->willReturn($variablesMap);
$html = '<div style="padding:var(--wp--preset--spacing--10);margin:var(--wp--preset--spacing--20)"><p style="color:white;padding-left:var(--wp--preset--spacing--10);">Helloo I have padding var(--wp--preset--spacing--10); </p></div>';
$result = $this->postprocessor->postprocess($html);
$this->assertEquals('<div style="padding:10px;margin:20px"><p style="color:white;padding-left:10px;">Helloo I have padding var(--wp--preset--spacing--10); </p></div>', $result);