Skip to content

Commit

Permalink
Changing call to non static method in a
Browse files Browse the repository at this point in the history
static method.
  • Loading branch information
cyrilverloop committed Apr 15, 2023
1 parent f6b120a commit b5c4f90
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/RequestTest.php
Expand Up @@ -89,7 +89,7 @@ private function getOrders(): array
* Returns search parameters.
* @return array search parameters.
*/
private function getSearch(): array
private static function getSearch(): array
{
return [
'value' => 'value',
Expand All @@ -105,9 +105,9 @@ private function getSearch(): array
public static function getParametersForRangeExceptions(): array
{
return [
'when start is negative' => [[], [], -1, 1, $this->getSearch()],
'when length is zero' => [[], [], 0, 0, $this->getSearch()],
'when length is less than minus one' => [[], [], 0, -2, $this->getSearch()],
'when start is negative' => [[], [], -1, 1, self::getSearch()],
'when length is zero' => [[], [], 0, 0, self::getSearch()],
'when length is less than minus one' => [[], [], 0, -2, self::getSearch()],
];
}

Expand Down Expand Up @@ -170,7 +170,7 @@ public function testCanGiveCriteria(): void
$this->getOrders(),
0,
-1,
$this->getSearch()
self::getSearch()
);
$criterias = $request->getCriterias();

Expand All @@ -192,7 +192,7 @@ public function testCanHaveEmptyOrderByWhenThereIsNoOrders(): void
[],
0,
-1,
$this->getSearch()
self::getSearch()
);

self::assertSame([], $request->getOrderBy(), 'The value must be an empty array.');
Expand All @@ -217,7 +217,7 @@ public function testCanThrowAnOutOfBoundsExceptionIfOrderByANonOrderablaColumn()
$orders,
0,
-1,
$this->getSearch()
self::getSearch()
);

$this->expectException(\OutOfBoundsException::class);
Expand Down Expand Up @@ -248,7 +248,7 @@ public function testCanGiveOrderBy(): void
$orders,
0,
-1,
$this->getSearch()
self::getSearch()
);

$orderBy = $request->getOrderBy();
Expand Down

0 comments on commit b5c4f90

Please sign in to comment.