- Timestamp:
- 06/27/2023 11:11:02 AM (20 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/wpRestBlockPatternsController.php
r55457 r56063 77 77 'categories' => array( 'test' ), 78 78 'templateTypes' => array( 'page' ), 79 'source' => 'theme', 79 80 ) 80 81 ); … … 87 88 'categories' => array( 'test' ), 88 89 'templateTypes' => array( 'single' ), 90 'source' => 'core', 89 91 ) 90 92 ); … … 96 98 'content' => '<!-- wp:paragraph --><p>Three</p><!-- /wp:paragraph -->', 97 99 'categories' => array( 'test', 'buttons', 'query' ), 100 'source' => 'pattern-directory/featured', 98 101 ) 99 102 ); … … 125 128 126 129 $request = new WP_REST_Request( 'GET', static::REQUEST_ROUTE ); 127 $request['_fields'] = 'name,content, template_types';130 $request['_fields'] = 'name,content,source,template_types'; 128 131 $response = rest_get_server()->dispatch( $request ); 129 132 $data = $response->get_data(); … … 136 139 'content' => '<!-- wp:heading {"level":1} --><h1>One</h1><!-- /wp:heading -->', 137 140 'template_types' => array( 'page' ), 141 'source' => 'theme', 138 142 ), 139 143 $data[0], … … 145 149 'content' => '<!-- wp:paragraph --><p>Two</p><!-- /wp:paragraph -->', 146 150 'template_types' => array( 'single' ), 151 'source' => 'core', 147 152 ), 148 153 $data[1],
Note: See TracChangeset
for help on using the changeset viewer.