Refactor initialization of the email editor
This changes how the editor is initialized. The integration initialization class doesn't get the engine class anymore, but integration is initialized via mailpoet_email_editor_initialized action triggered from the engine. This allows multiple integrations to hook into the engine. [MAILPOET-5540]
This commit is contained in:
committed by
Jan Lysý
parent
2517023ad0
commit
b70ad064c7
@@ -27,6 +27,7 @@ class EmailEditorTest extends \MailPoetTest {
|
||||
|
||||
public function testItRegistersMailPoetEmailPostType() {
|
||||
$this->emailEditor->initialize();
|
||||
$this->diContainer->get(\MailPoet\EmailEditor\Engine\EmailEditor::class)->initialize();
|
||||
$postTypes = get_post_types();
|
||||
$this->assertArrayHasKey('mailpoet_email', $postTypes);
|
||||
}
|
||||
|
Reference in New Issue
Block a user