| @@ 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( |
|
| @@ 112-122 (lines=11) @@ | ||
| 109 | $target_markup_filename = str_replace( '.serialized.html', '.server-rendered.html', $file ); |
|
| 110 | ||
| 111 | // Create a server rendered fixture if one does not exist. |
|
| 112 | if ( ! file_exists( $target_markup_filename ) ) { |
|
| 113 | file_put_contents( $target_markup_filename, $rendered_output ); |
|
| 114 | $fail_messages[] = |
|
| 115 | sprintf( |
|
| 116 | "No server rendered fixture could be found for the %s block's %s fixture\n" . |
|
| 117 | "A fixture file has been created in: %s\n", |
|
| 118 | 'jetpack/story', |
|
| 119 | basename( $file ), |
|
| 120 | $fixtures_path . basename( $target_markup_filename ) |
|
| 121 | ); |
|
| 122 | } |
|
| 123 | ||
| 124 | $server_rendered_fixture = file_get_contents( $target_markup_filename ); |
|
| 125 | $this->assertEquals( |
|