Skip to content

Commit ac138d4

Browse files
committedSep 17, 2023
minor cs
1 parent ffab2a0 commit ac138d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
 

‎tests/AppTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function testUrl(string $requestUrl, array $appStickyGetArguments, array
133133
self::assertSame($expectedUrl, $app->url(($page[0] ?? '') . (count($pageAssocOnly) > 0 ? '?' . implode('&', array_map(static fn ($k) => $k . '=' . $pageAssocOnly[$k], array_keys($pageAssocOnly))) : ''), $extraRequestUrlArgs));
134134
self::assertSame($expectedUrl, $app->jsUrl($page, array_merge(['__atk_json' => null], $extraRequestUrlArgs)));
135135

136-
$replaceExpectedUrlFx = static function (string $ext) use ($page, $expectedUrl) {
136+
$makeExpectedUrlFx = static function (string $ext) use ($page, $expectedUrl) {
137137
return preg_replace_callback('~^[^?]*?\K(\.php)(?=\?|$)~', static function ($matches) use ($page, $ext) {
138138
if ($matches[1] !== '' && !preg_match('~\.php(?=\?|$)~', $page[0] ?? '')) {
139139
$matches[1] = $ext;
@@ -149,7 +149,7 @@ public function testUrl(string $requestUrl, array $appStickyGetArguments, array
149149
'urlBuildingIndexPage' => '',
150150
'urlBuildingExt' => '',
151151
]);
152-
$expectedUrlAutoindex = $replaceExpectedUrlFx('');
152+
$expectedUrlAutoindex = $makeExpectedUrlFx('');
153153
self::assertSame($expectedUrlAutoindex, $app->url($page, $extraRequestUrlArgs));
154154

155155
$app = $this->createApp([
@@ -158,7 +158,7 @@ public function testUrl(string $requestUrl, array $appStickyGetArguments, array
158158
'urlBuildingIndexPage' => '',
159159
'urlBuildingExt' => '.html',
160160
]);
161-
$expectedUrlAutoindex2 = $replaceExpectedUrlFx('.html');
161+
$expectedUrlAutoindex2 = $makeExpectedUrlFx('.html');
162162
self::assertSame($expectedUrlAutoindex2, $app->url($page, $extraRequestUrlArgs));
163163
}
164164
}

0 commit comments

Comments
 (0)