Skip to content

Commit dbb5598

Browse files
committed
Add tests for watermelon ID column name configuration
1 parent 658fe19 commit dbb5598

File tree

9 files changed

+713
-27
lines changed

9 files changed

+713
-27
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/vendor
2-
.env
2+
.idea
3+
.phpunit.cache
34
.phpunit.result.cache
5+
.env
46
composer.phar
57
composer.lock
68
phpunit.xml

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ class Task extends Model
165165

166166
If you have PHP and Composer installed on your local machine you should be able to easily run the PHPUnit test suite.
167167

168+
```
169+
./vendor/bin/phpunit
170+
```
171+
168172
If you prefer to run the tests within a Docker container, this project includes
169173
[Laravel Sail](https://laravel.com/docs/8.x/sail).
170174

@@ -177,9 +181,9 @@ docker run --rm \
177181
-w /opt \
178182
laravelsail/php80-composer:latest \
179183
composer install --ignore-platform-reqs
180-
```
181184
182-
To run the test suite:
185+
docker-compose up -d
186+
```
183187

184188
```
185189
sail exec laravel.test ./vendor/bin/phpunit

composer.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@
1818
"illuminate/support": "^10.13.2"
1919
},
2020
"require-dev": {
21-
"laravel/sail": "^1.9",
22-
"orchestra/testbench": "^6.19",
23-
"phpunit/phpunit": "^9.5"
21+
"laravel/sail": "^1.26",
22+
"orchestra/testbench": "^8.15"
2423
},
2524
"autoload": {
2625
"psr-4": {

phpunit.xml.dist

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
4-
backupGlobals="false"
5-
backupStaticAttributes="false"
6-
beStrictAboutTestsThatDoNotTestAnything="true"
7-
bootstrap="vendor/autoload.php"
8-
colors="true"
9-
convertErrorsToExceptions="true"
10-
convertNoticesToExceptions="true"
11-
convertWarningsToExceptions="true"
12-
processIsolation="false"
13-
stopOnError="false"
14-
stopOnFailure="false"
15-
verbose="true"
16-
>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd" backupGlobals="false" beStrictAboutTestsThatDoNotTestAnything="true" bootstrap="vendor/autoload.php" colors="true" processIsolation="false" stopOnError="false" stopOnFailure="false" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
173
<php>
184
<env name="APP_KEY" value="EncryptionKeyABCDEFGHIJKLMNOPQRS"/>
195
<env name="DB_CONNECTION" value="sqlite"/>
206
<env name="DB_DATABASE" value=":memory:"/>
217
</php>
22-
<coverage processUncoveredFiles="true">
23-
<include>
24-
<directory suffix=".php">./src</directory>
25-
</include>
26-
</coverage>
8+
<coverage/>
279
<testsuites>
2810
<testsuite name="Laravel Watermelon Unit Test Suite">
2911
<directory suffix="Test.php">./tests/Unit</directory>
@@ -32,4 +14,9 @@
3214
<directory suffix="Test.php">./tests/Feature</directory>
3315
</testsuite>
3416
</testsuites>
17+
<source>
18+
<include>
19+
<directory suffix=".php">./src</directory>
20+
</include>
21+
</source>
3522
</phpunit>

0 commit comments

Comments
 (0)