- Timestamp:
- 01/31/2023 04:47:58 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/wpRestBlockPatternsController.php
r55125 r55168 82 82 'viewportWidth' => 1440, 83 83 'content' => '<!-- wp:heading {"level":1} --><h1>One</h1><!-- /wp:heading -->', 84 'templateTypes' => array( 'page' ), 84 85 ) 85 86 ); … … 88 89 'test/two', 89 90 array( 90 'title' => 'Pattern Two', 91 'categories' => array( 'test' ), 92 'content' => '<!-- wp:paragraph --><p>Two</p><!-- /wp:paragraph -->', 91 'title' => 'Pattern Two', 92 'categories' => array( 'test' ), 93 'content' => '<!-- wp:paragraph --><p>Two</p><!-- /wp:paragraph -->', 94 'templateTypes' => array( 'single' ), 93 95 ) 94 96 ); … … 129 131 130 132 $request = new WP_REST_Request( 'GET', static::REQUEST_ROUTE ); 131 $request['_fields'] = 'name,content ';133 $request['_fields'] = 'name,content,template_types'; 132 134 $response = rest_get_server()->dispatch( $request ); 133 135 $data = $response->get_data(); … … 137 139 $this->assertSame( 138 140 array( 139 'name' => 'test/one', 140 'content' => '<!-- wp:heading {"level":1} --><h1>One</h1><!-- /wp:heading -->', 141 'name' => 'test/one', 142 'content' => '<!-- wp:heading {"level":1} --><h1>One</h1><!-- /wp:heading -->', 143 'template_types' => array( 'page' ), 141 144 ), 142 145 $data[0], … … 145 148 $this->assertSame( 146 149 array( 147 'name' => 'test/two', 148 'content' => '<!-- wp:paragraph --><p>Two</p><!-- /wp:paragraph -->', 150 'name' => 'test/two', 151 'content' => '<!-- wp:paragraph --><p>Two</p><!-- /wp:paragraph -->', 152 'template_types' => array( 'single' ), 149 153 ), 150 154 $data[1],
Note: See TracChangeset
for help on using the changeset viewer.