| @@ 44-54 (lines=11) @@ | ||
| 41 | $target_markup_filename = str_replace( '.serialized.html', $target_extension, $file ); |
|
| 42 | ||
| 43 | // Create a server rendered fixture if one does not exist. |
|
| 44 | if ( ! file_exists( $target_markup_filename ) ) { |
|
| 45 | file_put_contents( $target_markup_filename, $rendered_output ); |
|
| 46 | $fail_messages[] = |
|
| 47 | sprintf( |
|
| 48 | "No server rendered fixture could be found for the %s block's %s fixture\n" . |
|
| 49 | "A fixture file has been created in: %s\n", |
|
| 50 | $block_name, |
|
| 51 | basename( $file ), |
|
| 52 | $fixtures_path . basename( $target_markup_filename ) |
|
| 53 | ); |
|
| 54 | } |
|
| 55 | ||
| 56 | $server_rendered_fixture = file_get_contents( $target_markup_filename ); |
|
| 57 | $this->assertEquals( |
|
| @@ 85-95 (lines=11) @@ | ||
| 82 | $target_markup_filename = str_replace( '.serialized.html', '.server-rendered.html', $file ); |
|
| 83 | ||
| 84 | // Create a server rendered fixture if one does not exist. |
|
| 85 | if ( ! file_exists( $target_markup_filename ) ) { |
|
| 86 | file_put_contents( $target_markup_filename, $rendered_output ); |
|
| 87 | $fail_messages[] = |
|
| 88 | sprintf( |
|
| 89 | "No server rendered fixture could be found for the %s block's %s fixture\n" . |
|
| 90 | "A fixture file has been created in: %s\n", |
|
| 91 | BLOCK_NAME, |
|
| 92 | basename( $file ), |
|
| 93 | $fixtures_path . basename( $target_markup_filename ) |
|
| 94 | ); |
|
| 95 | } |
|
| 96 | ||
| 97 | $server_rendered_fixture = file_get_contents( $target_markup_filename ); |
|
| 98 | $this->assertEquals( |
|