Skip to content

Commit

Permalink
test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
nguyentranchung committed May 28, 2024
1 parent 8f30c25 commit b713ae7
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/public/build
/public/hot
/public/storage
/public/coverage
/storage/*.key
/vendor
.env
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,11 @@ Vui lòng chạy lệnh dưới đây trước khi gửi Pull Request!
composer ide
php artisan test
```

## Test Coverage

```bash
php artisan test --coverage
```

Mở trình duyệt http://127.0.0.1:8000/coverage/index.html để xem kết quả
33 changes: 20 additions & 13 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="Unit">
Expand All @@ -17,17 +17,24 @@
<directory>app</directory>
</include>
</source>
<coverage>
<report>
<html outputDirectory="public/coverage" />
<text outputFile="public/coverage/coverage.txt" />
<clover outputFile="public/coverage/clover.xml" />
</report>
</coverage>
<php>
<env name="APP_ENV" value="testing"/>
<env name="APP_MAINTENANCE_DRIVER" value="file"/>
<env name="BCRYPT_ROUNDS" value="4"/>
<env name="CACHE_STORE" value="array"/>
<env name="APP_ENV" value="testing" />
<env name="APP_MAINTENANCE_DRIVER" value="file" />
<env name="BCRYPT_ROUNDS" value="4" />
<env name="CACHE_STORE" value="array" />
<!-- <env name="DB_CONNECTION" value="sqlite"/> -->
<!-- <env name="DB_DATABASE" value=":memory:"/> -->
<env name="MAIL_MAILER" value="array"/>
<env name="PULSE_ENABLED" value="false"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="TELESCOPE_ENABLED" value="false"/>
<env name="MAIL_MAILER" value="array" />
<env name="PULSE_ENABLED" value="false" />
<env name="QUEUE_CONNECTION" value="sync" />
<env name="SESSION_DRIVER" value="array" />
<env name="TELESCOPE_ENABLED" value="false" />
</php>
</phpunit>
</phpunit>

0 comments on commit b713ae7

Please sign in to comment.