@@ -16,17 +16,18 @@ describe.each(SupportedPHPVersions)(
16
16
( phpVersion ) => {
17
17
let php : PHP ;
18
18
let handler : PHPRequestHandler ;
19
- let getFileNotFoundActionTest : FileNotFoundGetActionCallback = ( ) => ( {
20
- type : '404' ,
21
- } ) ;
19
+ let getFileNotFoundActionForTest : FileNotFoundGetActionCallback =
20
+ ( ) => ( {
21
+ type : '404' ,
22
+ } ) ;
22
23
beforeEach ( async ( ) => {
23
24
handler = new PHPRequestHandler ( {
24
25
documentRoot : '/' ,
25
26
phpFactory : async ( ) =>
26
27
new PHP ( await loadNodeRuntime ( phpVersion ) ) ,
27
28
maxPhpInstances : 1 ,
28
29
getFileNotFoundAction : ( relativePath : string ) => {
29
- return getFileNotFoundActionTest ( relativePath ) ;
30
+ return getFileNotFoundActionForTest ( relativePath ) ;
30
31
} ,
31
32
} ) ;
32
33
php = await handler . getPrimaryPhp ( ) ;
@@ -143,7 +144,7 @@ describe.each(SupportedPHPVersions)(
143
144
] ;
144
145
fileNotFoundFallbackTestUris . forEach ( ( nonExtistentFileUri ) => {
145
146
it ( `should relay a fallback response for non-existent file: '${ nonExtistentFileUri } '` , async ( ) => {
146
- getFileNotFoundActionTest = ( uri : string ) => {
147
+ getFileNotFoundActionForTest = ( uri : string ) => {
147
148
if ( uri === nonExtistentFileUri ) {
148
149
return {
149
150
type : 'response' ,
@@ -177,7 +178,7 @@ describe.each(SupportedPHPVersions)(
177
178
'expected fallback content'
178
179
) ;
179
180
180
- getFileNotFoundActionTest = ( uri : string ) => {
181
+ getFileNotFoundActionForTest = ( uri : string ) => {
181
182
if ( uri === nonExtistentFileUri ) {
182
183
return {
183
184
type : 'internal-redirect' ,
@@ -201,7 +202,7 @@ describe.each(SupportedPHPVersions)(
201
202
} ) ;
202
203
} ) ;
203
204
it ( `should support responding with a plain 404 for non-existent file: '${ nonExtistentFileUri } '` , async ( ) => {
204
- getFileNotFoundActionTest = ( ) => ( { type : '404' } ) ;
205
+ getFileNotFoundActionForTest = ( ) => ( { type : '404' } ) ;
205
206
const response = await handler . request ( {
206
207
url : nonExtistentFileUri ,
207
208
} ) ;
@@ -427,7 +428,8 @@ describe.each(SupportedPHPVersions)(
427
428
428
429
describe ( 'WordPress requests' , ( ) => {
429
430
beforeEach ( ( ) => {
430
- getFileNotFoundActionTest = getFileNotFoundActionForWordPress ;
431
+ getFileNotFoundActionForTest =
432
+ getFileNotFoundActionForWordPress ;
431
433
} ) ;
432
434
it ( 'should delegate request for non-existent PHP file to /index.php with query args' , async ( ) => {
433
435
php . writeFile (
0 commit comments