From a592f6fe0bcadeb4229456e2f8e3e19650559e46 Mon Sep 17 00:00:00 2001 From: Matias Griese Date: Thu, 30 Jan 2020 09:11:19 +0200 Subject: [PATCH] Fixed unit test for Uri::currentPage(): it only returns integers now --- tests/unit/Grav/Common/UriTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/unit/Grav/Common/UriTest.php b/tests/unit/Grav/Common/UriTest.php index 9977d6732..d32f1a20c 100644 --- a/tests/unit/Grav/Common/UriTest.php +++ b/tests/unit/Grav/Common/UriTest.php @@ -188,7 +188,7 @@ class UriTest extends \Codeception\TestCase\Test 'environment' => 'localhost', 'basename' => 'it', 'base' => 'http://localhost:8080', - 'currentPage' => '', + 'currentPage' => 1, 'rootUrl' => 'http://localhost:8080', 'extension' => null, 'addNonce' => 'http://localhost:8080/grav/it/ueper:xxx/page:/test:yyy/nonce:{{nonce}}', @@ -298,7 +298,7 @@ class UriTest extends \Codeception\TestCase\Test 'environment' => 'api.getgrav.com', 'basename' => '128', 'base' => 'https://api.getgrav.com:4040', - 'currentPage' => 'x', + 'currentPage' => 1, 'rootUrl' => 'https://api.getgrav.com:4040', 'extension' => null, 'addNonce' => 'https://username:password@api.getgrav.com:4040/v1/post/128/page:x/nonce:{{nonce}}?all=1', @@ -1073,7 +1073,7 @@ class UriTest extends \Codeception\TestCase\Test $this->runTestSet($this->tests, 'currentPage'); $this->uri->initializeWithURL('http://localhost:8080/a-page/page:2')->init(); - $this->assertSame('2', $this->uri->currentPage()); + $this->assertSame(2, $this->uri->currentPage()); } public function testReferrer()