projects/plugins/jetpack/tests/php/extensions/blocks/class-block-fixture-testcase.php 1 location
|
@@ 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( |
projects/plugins/jetpack/tests/php/extensions/blocks/test-business-hours.php 1 location
|
@@ 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( |
projects/plugins/jetpack/tests/php/extensions/blocks/test-story.php 1 location
|
@@ 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( |