Skip to content

Commit

Permalink
Update PHPUnit configs & paginate() count (#54)
Browse files Browse the repository at this point in the history
* add .phpunit.result.cache to .gitignore

* update phpunit.xml

* working w/ Laravel - make paginate() count int
  • Loading branch information
astro2049 authored Feb 8, 2022
1 parent 9e4518c commit 9af85f4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/vendor
/.idea
tests/coverage
composer.lock
composer.lock
.phpunit.result.cache
14 changes: 7 additions & 7 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<coverage>
<include>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<logging>
<log type="coverage-html" target="coverage" charset="UTF-8"/>
</logging>
</include>
<report>
<html outputDirectory="tests/coverage"/>
</report>
</coverage>
</phpunit>
2 changes: 1 addition & 1 deletion src/Integrations/Laravel/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ public function delete()
*/
public function paginate(int $page = 1, int $perPage = 15): LengthAwarePaginator
{
$count = $this->getConnection()
$count = (int) $this->getConnection()
->table($this->cloneWithout(['columns' => []])
->select(new Expression('1')))
->count();
Expand Down

0 comments on commit 9af85f4

Please sign in to comment.