mirror of
https://github.com/codeigniter4/CodeIgniter4.git
synced 2025-02-20 11:44:28 +08:00
test: refactor: $request->uri → $request->getUri()
This commit is contained in:
parent
f95a8f5fbd
commit
015b302cc9
@ -940,11 +940,6 @@ parameters:
|
||||
count: 1
|
||||
path: system/Test/Fabricator.php
|
||||
|
||||
-
|
||||
message: "#^Access to protected property CodeIgniter\\\\HTTP\\\\Request\\:\\:\\$uri\\.$#"
|
||||
count: 1
|
||||
path: system/Test/FeatureTestCase.php
|
||||
|
||||
-
|
||||
message: "#^Property CodeIgniter\\\\Test\\\\CIUnitTestCase\\:\\:\\$bodyFormat \\(string\\) in isset\\(\\) is not nullable\\.$#"
|
||||
count: 1
|
||||
|
@ -349,7 +349,7 @@ class FeatureTestCase extends CIUnitTestCase
|
||||
// otherwise set it from the URL.
|
||||
$get = ! empty($params) && $method === 'get'
|
||||
? $params
|
||||
: $this->getPrivateProperty($request->uri, 'query');
|
||||
: $this->getPrivateProperty($request->getUri(), 'query');
|
||||
|
||||
$request->setGlobal('get', $get);
|
||||
if ($method !== 'get') {
|
||||
|
@ -344,7 +344,7 @@ trait FeatureTestTrait
|
||||
// otherwise set it from the URL.
|
||||
$get = ! empty($params) && $method === 'get'
|
||||
? $params
|
||||
: $this->getPrivateProperty($request->uri, 'query');
|
||||
: $this->getPrivateProperty($request->getUri(), 'query');
|
||||
|
||||
$request->setGlobal('get', $get);
|
||||
if ($method !== 'get') {
|
||||
|
@ -875,7 +875,7 @@ final class URITest extends CIUnitTestCase
|
||||
Services::injectMock('request', $request);
|
||||
|
||||
// going through request
|
||||
$this->assertSame('http://example.com/ci/v4/controller/method', (string) $request->uri);
|
||||
$this->assertSame('http://example.com/ci/v4/controller/method', (string) $request->getUri());
|
||||
$this->assertSame('/ci/v4/controller/method', $request->getUri()->getPath());
|
||||
|
||||
// standalone
|
||||
|
Loading…
x
Reference in New Issue
Block a user