| @@ 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( | |
| @@ 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( | |