Skip to content

Commit 62b91d2

Browse files
authored
rename
1 parent bc9b5c0 commit 62b91d2

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/Illuminate/Contracts/Routing/UrlGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public function signedRoute($name, $parameters = [], $expiration = null, $absolu
8181
*
8282
* @throws \InvalidArgumentException
8383
*/
84-
public function signedUrl($url, $expiration = null);
84+
public function signed($url, $expiration = null);
8585

8686
/**
8787
* Create a temporary signed route URL for a named route.

src/Illuminate/Routing/UrlGenerator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ public function signedRoute($name, $parameters = [], $expiration = null, $absolu
388388
*
389389
* @throws \InvalidArgumentException
390390
*/
391-
public function signedUrl($url, $expiration = null)
391+
public function signed($url, $expiration = null)
392392
{
393393
$uri = Uri::of($url);
394394

tests/Routing/RoutingUrlGeneratorTest.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ public function testSignedUrlWithKeyResolver()
939939
$this->assertTrue($url3->hasValidSignature($secondRequest));
940940
}
941941

942-
public function testSignedUrlWithRawUrl()
942+
public function testSignedRawUrl()
943943
{
944944
$url = new UrlGenerator(
945945
new RouteCollection,
@@ -949,7 +949,7 @@ public function testSignedUrlWithRawUrl()
949949
return 'secret';
950950
});
951951

952-
$signedUrl = $url->signedUrl('http://www.foo.com/test');
952+
$signedUrl = $url->signed('http://www.foo.com/test');
953953
$this->assertStringContainsString('signature=', $signedUrl);
954954

955955
$request = Request::create($signedUrl);
@@ -959,7 +959,7 @@ public function testSignedUrlWithRawUrl()
959959
$this->assertFalse($url->hasValidSignature($request));
960960
}
961961

962-
public function testSignedUrlWithExistingQueryParameters()
962+
public function testSignedRawUrlWithExistingQueryParameters()
963963
{
964964
$url = new UrlGenerator(
965965
new RouteCollection,
@@ -969,7 +969,7 @@ public function testSignedUrlWithExistingQueryParameters()
969969
return 'secret';
970970
});
971971

972-
$signedUrl = $url->signedUrl('http://www.foo.com/test?param1=value1&param2=value2');
972+
$signedUrl = $url->signed('http://www.foo.com/test?param1=value1&param2=value2');
973973
$this->assertStringContainsString('signature=', $signedUrl);
974974
$this->assertStringContainsString('param1=value1', $signedUrl);
975975
$this->assertStringContainsString('param2=value2', $signedUrl);
@@ -978,7 +978,7 @@ public function testSignedUrlWithExistingQueryParameters()
978978
$this->assertTrue($url->hasValidSignature($request));
979979
}
980980

981-
public function testSignedUrlWithExpiration()
981+
public function testSignedRawUrlWithExpiration()
982982
{
983983
$url = new UrlGenerator(
984984
new RouteCollection,
@@ -989,7 +989,7 @@ public function testSignedUrlWithExpiration()
989989
});
990990

991991
Carbon::setTestNow(Carbon::create(2025, 1, 1));
992-
$signedUrl = $url->signedUrl('http://www.foo.com/test', now()->addMinutes(5));
992+
$signedUrl = $url->signed('http://www.foo.com/test', now()->addMinutes(5));
993993
$this->assertStringContainsString('signature=', $signedUrl);
994994
$this->assertStringContainsString('expires=', $signedUrl);
995995

@@ -1000,7 +1000,7 @@ public function testSignedUrlWithExpiration()
10001000
$this->assertFalse($url->hasValidSignature($request));
10011001
}
10021002

1003-
public function testSignedUrlWithReservedSignatureParameter()
1003+
public function testSignedRawUrlWithReservedSignatureParameter()
10041004
{
10051005
$url = new UrlGenerator(
10061006
new RouteCollection,
@@ -1013,10 +1013,10 @@ public function testSignedUrlWithReservedSignatureParameter()
10131013
$this->expectException(InvalidArgumentException::class);
10141014
$this->expectExceptionMessage('reserved');
10151015

1016-
$url->signedUrl('http://www.foo.com/test?signature=tampered');
1016+
$url->signed('http://www.foo.com/test?signature=tampered');
10171017
}
10181018

1019-
public function testSignedUrlWithReservedExpiresParameter()
1019+
public function testSignedRawUrlWithReservedExpiresParameter()
10201020
{
10211021
$url = new UrlGenerator(
10221022
new RouteCollection,
@@ -1029,7 +1029,7 @@ public function testSignedUrlWithReservedExpiresParameter()
10291029
$this->expectException(InvalidArgumentException::class);
10301030
$this->expectExceptionMessage('reserved');
10311031

1032-
$url->signedUrl('http://www.foo.com/test?expires=123456', now()->addMinutes(5));
1032+
$url->signed('http://www.foo.com/test?expires=123456', now()->addMinutes(5));
10331033
}
10341034

10351035
public function testMissingNamedRouteResolution()

0 commit comments

Comments
 (0)