assertArrayHasKey( $template_name, $templates ); unregister_block_template( $template_name ); } public function test_get_block_template_from_registry() { $template_name = 'test-plugin//test-template'; $args = array( 'title' => 'Test Template', ); register_block_template( $template_name, $args ); $template = get_block_template( 'block-theme//test-template' ); $this->assertSame( 'Test Template', $template->title ); unregister_block_template( $template_name ); } }