diff --git a/tests/phpunit/tests/rest-api/wpRestTemplatesController.php b/tests/phpunit/tests/rest-api/wpRestTemplatesController.php index 9ba38231d3c33..801224eb7c51b 100644 --- a/tests/phpunit/tests/rest-api/wpRestTemplatesController.php +++ b/tests/phpunit/tests/rest-api/wpRestTemplatesController.php @@ -119,6 +119,8 @@ public function test_get_items() { 'is_custom' => true, 'author' => 0, 'modified' => mysql_to_rfc3339( self::$post->post_modified ), + 'author_text' => 'Test Blog', + 'original_source' => 'site', ), $this->find_and_normalize_template_by_id( $data, 'default//my_template' ) ); @@ -164,6 +166,8 @@ public function test_get_item() { 'is_custom' => true, 'author' => 0, 'modified' => mysql_to_rfc3339( self::$post->post_modified ), + 'author_text' => 'Test Blog', + 'original_source' => 'site', ), $data ); @@ -201,6 +205,8 @@ public function test_get_item_works_with_a_single_slash( $endpoint_url ) { 'is_custom' => true, 'author' => 0, 'modified' => mysql_to_rfc3339( self::$post->post_modified ), + 'author_text' => 'Test Blog', + 'original_source' => 'site', ), $data ); @@ -241,6 +247,7 @@ public function test_get_item_with_valid_theme_dirname( $theme_dir, $template, a $data = $response->get_data(); unset( $data['content'] ); unset( $data['_links'] ); + $author_name = get_user_by( 'id', self::$admin_id )->get( 'display_name' ); $this->assertSameSetsWithIndex( array( @@ -261,6 +268,8 @@ public function test_get_item_with_valid_theme_dirname( $theme_dir, $template, a 'is_custom' => true, 'author' => self::$admin_id, 'modified' => mysql_to_rfc3339( $post->post_modified ), + 'author_text' => $author_name, + 'original_source' => 'user', ), $data ); @@ -442,6 +451,8 @@ public function test_create_item() { 'is_custom' => true, 'author' => self::$admin_id, 'modified' => mysql_to_rfc3339( $modified ), + 'author_text' => 'Test Blog', + 'original_source' => 'site', ), $data ); @@ -490,6 +501,8 @@ public function test_create_item_with_numeric_slug() { 'is_custom' => false, 'author' => self::$admin_id, 'modified' => mysql_to_rfc3339( $modified ), + 'author_text' => 'Test Blog', + 'original_source' => 'site', ), $data ); @@ -542,6 +555,8 @@ public function test_create_item_raw() { 'is_custom' => true, 'author' => self::$admin_id, 'modified' => mysql_to_rfc3339( $modified ), + 'author_text' => 'Test Blog', + 'original_source' => 'site', ), $data );