Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 0 additions & 35 deletions php-transformer/tests/migration/examples.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,41 +71,6 @@
continue;
}

if ( 'block-format-bridge-wrapper.php' === $name ) {
$smoke(
$name,
$example,
$assertions . <<<'PHP'
$serialized = bfb_convert( '<h2>Hello</h2>', 'html', 'blocks' );
$assert( str_contains( $serialized, '<!-- wp:heading' ), 'BFB convert returns serialized heading block' );
$blocks = bfb_to_blocks( '<p>Hello</p>', 'html' );
$assert( isset( $blocks[0]['blockName'] ) && 'core/paragraph' === $blocks[0]['blockName'], 'BFB to_blocks returns block arrays' );
$assert( "# Hello\n" === bfb_normalize( "# Hello\r\n", 'markdown' ), 'BFB normalize maps markdown newlines' );
$fragment = bfb_convert_fragment( '<p>Scoped</p>', array( 'source_id' => 'fixture' ) );
$assert( true === $fragment['success'] && 'fixture' === $fragment['scope']['source_id'], 'BFB fragment wrapper returns scoped envelope' );
$capabilities = bfb_capabilities();
$assert( isset( $capabilities['formats']['html'] ), 'BFB capabilities report includes html format' );
PHP
);
continue;
}

if ( 'block-artifact-compiler-wrapper.php' === $name ) {
$smoke(
$name,
$example,
$assertions . <<<'PHP'
$compiled = bac_compile_website_artifact( array( 'generated_html' => '<main><h1>Hello</h1></main>' ) );
$assert( isset( $compiled['serialized_blocks'] ) && str_contains( $compiled['serialized_blocks'], '<!-- wp:html -->' ), 'BAC wrapper compiles generated HTML' );
$fragment = bac_compile_fragment( '<p>Fragment</p>', 'fragment', 'html' );
$assert( isset( $fragment['schema'] ), 'BAC fragment wrapper returns result envelope' );
$summary = bac_summarize_result( $compiled );
$assert( isset( $summary['diagnostic_count'] ), 'BAC summary wrapper returns counts' );
PHP
);
continue;
}

if ( 'static-site-importer-transformer-adapter.php' === $name ) {
$smoke(
$name,
Expand Down
6 changes: 1 addition & 5 deletions php-transformer/tests/parity/run.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,8 +415,6 @@ function legacyRepoForOperation(string $operation): string
{
return match ( $operation ) {
'html_transformer.transform' => 'html-to-blocks-converter',
'format_bridge.normalize' => 'block-format-bridge',
'artifact_compiler.compile' => 'block-artifact-compiler',
default => '',
};
}
Expand All @@ -425,16 +423,14 @@ function legacyCallableForOperation(string $operation): string
{
return match ( $operation ) {
'html_transformer.transform' => 'html_to_blocks_convert',
'format_bridge.normalize' => 'bfb_normalize',
'artifact_compiler.compile' => 'bac_compile_website_artifact',
default => '',
};
}

function legacyBootstrapForRepo(string $repo): string
{
return match ( $repo ) {
'html-to-blocks-converter', 'block-format-bridge', 'block-artifact-compiler' => 'library.php',
'html-to-blocks-converter' => 'library.php',
default => '',
};
}
Expand Down
Loading