Remove code that is no longer necessary for the templates to work

[MAILPOET-6356]
This commit is contained in:
Rostislav Wolny
2024-12-13 16:52:28 +01:00
committed by Rostislav Wolný
parent 2fc0ad3c9e
commit 2e661f8b8e
5 changed files with 10 additions and 411 deletions

View File

@@ -44,39 +44,4 @@ class Templates_Test extends \MailPoetTest {
verify( $template->title )->equals( 'General Email' );
verify( $template->description )->equals( 'A general template for emails.' );
}
/**
* Test it can add block templates
*
* @return void
*/
public function testItCanAddBlockTemplates(): void {
$result = $this->templates->add_block_templates( array(), array( 'post_type' => 'mailpoet_email' ), 'wp_template' );
verify( $result )->arrayCount( 2 );
verify( $result[0]->content )->notEmpty();
verify( $result[1]->content )->notEmpty();
}
/**
* Test it can add and update block template details.
*
* @return void
*/
public function testItCanAddBlockTemplateDetails(): void {
// add_block_template_details.
$basic_template = new \WP_Block_Template();
$basic_template->slug = 'simple-light';
// confirm it has no title or description.
verify( $basic_template->title )->equals( '' );
verify( $basic_template->description )->equals( '' );
$result = $this->templates->add_block_template_details( $basic_template );
// confirm template was updated.
verify( $basic_template->title )->equals( 'Simple Light' );
verify( $basic_template->description )->equals( 'A basic template with header and footer.' );
verify( $result )->equals( $basic_template );
}
}