Move the template_id construction logic to Templates class
[MAILPOET-6356]
This commit is contained in:
committed by
Rostislav Wolný
parent
a5db2564c8
commit
9b9187bb3e
@@ -35,12 +35,11 @@ class Templates_Test extends \MailPoetTest {
|
||||
* @return void
|
||||
*/
|
||||
public function testItCanFetchBlockTemplate(): void {
|
||||
$template_id = get_stylesheet() . '//email-general'; // Templates id is prefixed with the theme name.
|
||||
$template = $this->templates->get_block_template( $template_id );
|
||||
$template = $this->templates->get_block_template( 'email-general' );
|
||||
|
||||
self::assertInstanceOf( \WP_Block_Template::class, $template );
|
||||
verify( $template->slug )->equals( 'email-general' );
|
||||
verify( $template->id )->equals( $template_id );
|
||||
verify( $template->id )->stringContainsString( 'email-general' );
|
||||
verify( $template->title )->equals( 'General Email' );
|
||||
verify( $template->description )->equals( 'A general template for emails.' );
|
||||
}
|
||||
|
Reference in New Issue
Block a user