@@ -540,12 +540,17 @@ echo json_encode(array($legacy_project_autoload_file, $harness_autoload_file));
540540` )
541541assert . deepEqual ( JSON . parse ( execFileSync ( "php" , [ canonicalHarnessProbe ] , { encoding : "utf8" } ) ) , [ "" , "/tmp/wp-codebox-inputs/0-wp-codebox-vendor-73845ca47d2f/autoload.php" ] , "a canonical staged harness path remains the harness in project mode" )
542542
543+ function decodeSubmittedBootstrap ( code : string ) : string {
544+ const encodedBootstrap = code . match ( / b a s e 6 4 _ d e c o d e \( " ( [ A - Z a - z 0 - 9 + / = ] + ) " \) / ) ?. [ 1 ]
545+ return encodedBootstrap ? Buffer . from ( encodedBootstrap , "base64" ) . toString ( "utf8" ) : code
546+ }
547+
543548let capturedCanonicalHarnessCode = ""
544549await runPhpunitCommand ( {
545550 artifactRoot : mkdtempSync ( join ( tmpdir ( ) , "wp-codebox-phpunit-artifacts-" ) ) ,
546551 mounts : [ ] ,
547552 runPlaygroundCommand : async ( _command , _server , input ) => {
548- capturedCanonicalHarnessCode = input . code
553+ capturedCanonicalHarnessCode = decodeSubmittedBootstrap ( input . code )
549554 return { text : "ok" , exitCode : 0 }
550555 } ,
551556 runtimeSpec : phpunitRuntimeSpec ,
@@ -573,7 +578,7 @@ await runPhpunitCommand({
573578 artifactRoot : mkdtempSync ( join ( tmpdir ( ) , "wp-codebox-phpunit-artifacts-" ) ) ,
574579 mounts : [ ] ,
575580 runPlaygroundCommand : async ( _command , _server , input ) => {
576- capturedExplicitCode = input . code
581+ capturedExplicitCode = decodeSubmittedBootstrap ( input . code )
577582 return { text : "ok" , exitCode : 0 }
578583 } ,
579584 runtimeSpec : phpunitRuntimeSpec ,
0 commit comments