Skip to content

Commit a782e34

Browse files
committed
Improve testing lib
1 parent 5f8dd9a commit a782e34

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Lodash/Testing/Response.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function assertJsonDataPagination(array $data): self
4848
{
4949
$response = $this->getDecodedContent();
5050

51-
PHPUnit::assertEquals($data['page'], $response['meta']['pagination']['currentPage']);
51+
PHPUnit::assertEquals($data['currentPage'], $response['meta']['pagination']['currentPage']);
5252
PHPUnit::assertEquals($data['perPage'], $response['meta']['pagination']['perPage']);
5353
PHPUnit::assertEquals($data['count'], $response['meta']['pagination']['count']);
5454
PHPUnit::assertEquals($data['total'], $response['meta']['pagination']['total']);
@@ -67,6 +67,8 @@ public function assertJsonDataCollectionStructure(array $data, bool $includePage
6767
];
6868
}
6969

70+
PHPUnit::assertNotEmpty($this->getDecodedContent()['data'], 'Data collection is empty.');
71+
7072
$this->assertJsonStructure($struct);
7173

7274
return $this;

0 commit comments

Comments
 (0)