Make WordPress Core


Ignore:
Timestamp:
04/11/2022 10:36:02 AM (2 years ago)
Author:
gziolo
Message:

Editor: Add functionality required for theme export in the site editor

This bring across changes to theme export functionality, and related code, and tests. Relates issue in Gutenberg: https://github.com/WordPress/gutenberg/issues/39889.

Props scruffian, timothyblynjacobs, oandregal, ajlende, zieleadam.
See #55505.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/block-template-utils.php

    r52331 r53129  
    358358        $zip = new ZipArchive();
    359359        $zip->open( $filename );
    360         $has_theme_dir                = $zip->locateName( 'theme/' ) !== false;
    361         $has_block_templates_dir      = $zip->locateName( 'theme/templates/' ) !== false;
    362         $has_block_template_parts_dir = $zip->locateName( 'theme/parts/' ) !== false;
    363         $this->assertTrue( $has_theme_dir, 'theme directory exists' );
     360        $has_theme_json               = $zip->locateName( 'theme.json' ) !== false;
     361        $has_block_templates_dir      = $zip->locateName( 'templates/' ) !== false;
     362        $has_block_template_parts_dir = $zip->locateName( 'parts/' ) !== false;
     363        $this->assertTrue( $has_theme_json, 'theme.json exists' );
    364364        $this->assertTrue( $has_block_templates_dir, 'theme/templates directory exists' );
    365365        $this->assertTrue( $has_block_template_parts_dir, 'theme/parts directory exists' );
Note: See TracChangeset for help on using the changeset viewer.