mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-03 22:32:40 +08:00
Add void return to method in tests. (#20602)
This commit is contained in:
@ -79,7 +79,7 @@ class PaginationTest extends TestCase
|
||||
* @param array $params
|
||||
* @param bool $absolute
|
||||
*/
|
||||
public function testCreateUrl($page, $pageSize, $expectedUrl, $params, $absolute = false)
|
||||
public function testCreateUrl($page, $pageSize, $expectedUrl, $params, $absolute = false): void
|
||||
{
|
||||
$pagination = new Pagination();
|
||||
$pagination->route = 'item/list';
|
||||
@ -90,7 +90,7 @@ class PaginationTest extends TestCase
|
||||
/**
|
||||
* @depends testCreateUrl
|
||||
*/
|
||||
public function testForcePageParam()
|
||||
public function testForcePageParam(): void
|
||||
{
|
||||
$pagination = new Pagination();
|
||||
$pagination->route = 'item/list';
|
||||
@ -102,7 +102,7 @@ class PaginationTest extends TestCase
|
||||
$this->assertEquals('/index.php?r=item%2Flist', $pagination->createUrl(0));
|
||||
}
|
||||
|
||||
public function testValidatePage()
|
||||
public function testValidatePage(): void
|
||||
{
|
||||
$pagination = new Pagination();
|
||||
$pagination->validatePage = true;
|
||||
@ -139,7 +139,7 @@ class PaginationTest extends TestCase
|
||||
* @param int $totalCount
|
||||
* @param int $pageCount
|
||||
*/
|
||||
public function testPageCount($pageSize, $totalCount, $pageCount)
|
||||
public function testPageCount($pageSize, $totalCount, $pageCount): void
|
||||
{
|
||||
$pagination = new Pagination();
|
||||
$pagination->setPageSize($pageSize);
|
||||
@ -148,7 +148,7 @@ class PaginationTest extends TestCase
|
||||
$this->assertEquals($pageCount, $pagination->getPageCount());
|
||||
}
|
||||
|
||||
public function testGetDefaultPage()
|
||||
public function testGetDefaultPage(): void
|
||||
{
|
||||
$this->assertEquals(0, (new Pagination())->getPage());
|
||||
}
|
||||
@ -179,7 +179,7 @@ class PaginationTest extends TestCase
|
||||
* @param int $totalCount
|
||||
* @param int $page
|
||||
*/
|
||||
public function testSetPage($value, $validate, $totalCount, $page)
|
||||
public function testSetPage($value, $validate, $totalCount, $page): void
|
||||
{
|
||||
$pagination = new Pagination();
|
||||
$pagination->totalCount = $totalCount;
|
||||
@ -207,7 +207,7 @@ class PaginationTest extends TestCase
|
||||
* @param array|bool $pageSizeLimit
|
||||
* @param int $pageSize
|
||||
*/
|
||||
public function testGetPageSize($pageSizeLimit, $pageSize)
|
||||
public function testGetPageSize($pageSizeLimit, $pageSize): void
|
||||
{
|
||||
$pagination = new Pagination();
|
||||
$pagination->pageSizeLimit = $pageSizeLimit;
|
||||
@ -241,7 +241,7 @@ class PaginationTest extends TestCase
|
||||
* @param array|false $pageSizeLimit
|
||||
* @param int $pageSize
|
||||
*/
|
||||
public function testSetPageSize($value, $validate, $pageSizeLimit, $pageSize)
|
||||
public function testSetPageSize($value, $validate, $pageSizeLimit, $pageSize): void
|
||||
{
|
||||
$pagination = new Pagination();
|
||||
$pagination->pageSizeLimit = $pageSizeLimit;
|
||||
@ -268,7 +268,7 @@ class PaginationTest extends TestCase
|
||||
* @param int $page
|
||||
* @param int $offset
|
||||
*/
|
||||
public function testGetOffset($pageSize, $page, $offset)
|
||||
public function testGetOffset($pageSize, $page, $offset): void
|
||||
{
|
||||
$pagination = new Pagination();
|
||||
$pagination->setPageSize($pageSize);
|
||||
@ -292,7 +292,7 @@ class PaginationTest extends TestCase
|
||||
* @param int $pageSize
|
||||
* @param int $limit
|
||||
*/
|
||||
public function testGetLimit($pageSize, $limit)
|
||||
public function testGetLimit($pageSize, $limit): void
|
||||
{
|
||||
$pagination = new Pagination();
|
||||
$pagination->setPageSize($pageSize);
|
||||
@ -390,7 +390,7 @@ class PaginationTest extends TestCase
|
||||
* @param string|null $prev
|
||||
* @param string|null $next
|
||||
*/
|
||||
public function testGetLinks($page, $pageSize, $totalCount, $self, $first, $last, $prev, $next)
|
||||
public function testGetLinks($page, $pageSize, $totalCount, $self, $first, $last, $prev, $next): void
|
||||
{
|
||||
$pagination = new Pagination();
|
||||
$pagination->totalCount = $totalCount;
|
||||
|
||||
Reference in New Issue
Block a user