mirror of
https://github.com/yiisoft/yii2.git
synced 2025-12-18 14:28:57 +08:00
Add void return to method in tests. (#20602)
This commit is contained in:
@@ -22,7 +22,7 @@ class ArrayDataProviderTest extends TestCase
|
||||
$this->mockApplication();
|
||||
}
|
||||
|
||||
public function testGetModels()
|
||||
public function testGetModels(): void
|
||||
{
|
||||
$simpleArray = [
|
||||
['name' => 'zero'],
|
||||
@@ -32,7 +32,7 @@ class ArrayDataProviderTest extends TestCase
|
||||
$this->assertEquals($simpleArray, $dataProvider->getModels());
|
||||
}
|
||||
|
||||
public function testGetSortedData()
|
||||
public function testGetSortedData(): void
|
||||
{
|
||||
$simpleArray = [['sortField' => 1], ['sortField' => 0]];
|
||||
$dataProvider = new ArrayDataProvider(
|
||||
@@ -57,7 +57,7 @@ class ArrayDataProviderTest extends TestCase
|
||||
$this->assertEquals($sortedArray, $dataProvider->getModels());
|
||||
}
|
||||
|
||||
public function testGetSortedDataByInnerArrayField()
|
||||
public function testGetSortedDataByInnerArrayField(): void
|
||||
{
|
||||
$simpleArray = [
|
||||
['innerArray' => ['sortField' => 1]],
|
||||
@@ -88,7 +88,7 @@ class ArrayDataProviderTest extends TestCase
|
||||
$this->assertEquals($sortedArray, $dataProvider->getModels());
|
||||
}
|
||||
|
||||
public function testCaseSensitiveSort()
|
||||
public function testCaseSensitiveSort(): void
|
||||
{
|
||||
// source data
|
||||
$unsortedProjects = [
|
||||
@@ -157,7 +157,7 @@ class ArrayDataProviderTest extends TestCase
|
||||
$this->assertEquals($sortedProjects, $dataProvider->getModels());
|
||||
}
|
||||
|
||||
public function testGetKeys()
|
||||
public function testGetKeys(): void
|
||||
{
|
||||
$pagination = ['pageSize' => 2];
|
||||
|
||||
@@ -205,7 +205,7 @@ class ArrayDataProviderTest extends TestCase
|
||||
$this->assertEquals(['key1', 'key2'], $dataProvider->getKeys());
|
||||
}
|
||||
|
||||
public function testSortFlags()
|
||||
public function testSortFlags(): void
|
||||
{
|
||||
$simpleArray = [['sortField' => 1], ['sortField' => 2], ['sortField' => 11]];
|
||||
$dataProvider = new ArrayDataProvider(
|
||||
|
||||
Reference in New Issue
Block a user