@@ -407,12 +407,17 @@ echo json_encode(array($legacy_project_autoload_file, $harness_autoload_file));
407407` )
408408assert . 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" )
409409
410+ function decodeSubmittedBootstrap ( code : string ) : string {
411+ const encodedBootstrap = code . match ( / b a s e 6 4 _ d e c o d e \( " ( [ A - Z a - z 0 - 9 + / = ] + ) " \) / ) ?. [ 1 ]
412+ return encodedBootstrap ? Buffer . from ( encodedBootstrap , "base64" ) . toString ( "utf8" ) : code
413+ }
414+
410415let capturedCanonicalHarnessCode = ""
411416await runPhpunitCommand ( {
412417 artifactRoot : mkdtempSync ( join ( tmpdir ( ) , "wp-codebox-phpunit-artifacts-" ) ) ,
413418 mounts : [ ] ,
414419 runPlaygroundCommand : async ( _command , _server , input ) => {
415- capturedCanonicalHarnessCode = input . code
420+ capturedCanonicalHarnessCode = decodeSubmittedBootstrap ( input . code )
416421 return { text : "ok" , exitCode : 0 }
417422 } ,
418423 runtimeSpec : phpunitRuntimeSpec ,
@@ -439,7 +444,7 @@ await runPhpunitCommand({
439444 artifactRoot : mkdtempSync ( join ( tmpdir ( ) , "wp-codebox-phpunit-artifacts-" ) ) ,
440445 mounts : [ ] ,
441446 runPlaygroundCommand : async ( _command , _server , input ) => {
442- capturedExplicitCode = input . code
447+ capturedExplicitCode = decodeSubmittedBootstrap ( input . code )
443448 return { text : "ok" , exitCode : 0 }
444449 } ,
445450 runtimeSpec : phpunitRuntimeSpec ,
0 commit comments