Skip to content

Commit

Permalink
✅ Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
marcreichel committed Jun 5, 2021
1 parent f8aaf14 commit 93564af
Show file tree
Hide file tree
Showing 6 changed files with 641 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
.idea/
vendor/
build/
composer.lock
.phpunit.result.cache
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,14 @@ public function boot()

Further information on how to set up event listeners can be found on the [official docs](https://laravel.com/docs/events).

## Testing

Run the tests with:

```bash
composer test
```

## TODO List

- Write unit tests
Expand Down
11 changes: 11 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
"ext-json": "*"
},
"require-dev": {
"phpunit/phpunit": "^9.5.4",
"orchestra/testbench": "^6.0",
"nunomaduro/collision": "^5.3",
"roave/security-advisories": "dev-latest"
},
"license": "MIT",
Expand All @@ -18,11 +21,19 @@
"email": "[email protected]"
}
],
"scripts": {
"test": "./vendor/bin/testbench package:test"
},
"autoload": {
"psr-4": {
"MarcReichel\\IGDBLaravel\\": "src"
}
},
"autoload-dev": {
"psr-4": {
"MarcReichel\\IGDBLaravel\\Tests\\": "tests"
}
},
"extra": {
"laravel": {
"providers": [
Expand Down
39 changes: 39 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
executionOrder="random"
failOnWarning="true"
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
verbose="true"
>
<testsuites>
<testsuite name="IGDBLaravel Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
</phpunit>
Loading

0 comments on commit 93564af

Please sign in to comment.