File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -604,14 +604,18 @@ component extends="testbox.system.compat.framework.TestCase" accessors="true" {
604604 .each ( function ( name ){
605605 mockedEvent .setValue ( arguments .name , params [ arguments .name ] );
606606 } );
607- arguments .headers
608- .keyArray ()
609- .each ( function ( name ){
610- mockedEvent
611- .$( " getHTTPHeader" )
612- .$args ( arguments .name )
613- .$results ( headers [ arguments .name ] );
614- } );
607+ mockedEvent
608+ .$(
609+ method = " getHTTPHeader" ,
610+ callback = function ( name , defaultValue ){
611+ if ( headers .keyExists ( arguments .name ) ){
612+ return headers [ arguments .name ];
613+ }
614+ if ( ! isNull ( arguments .defaultValue ) ){
615+ return arguments .defaultValue ;
616+ }
617+ }
618+ );
615619 return this .execute ( argumentCollection = arguments );
616620 }
617621
You can’t perform that action at this time.
0 commit comments