File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
.idea
2
+ .phpunit.cache
2
3
.DS_Store
3
4
mariadb /data /*
4
5
mariadb /logs /*
Original file line number Diff line number Diff line change 35
35
docker compose exec -T php-fpm composer install
36
36
```
37
37
38
- 4 . ** Run PHPUnit tests:**
38
+ 4 . ** Run PHPUnit tests with code coverage :**
39
39
``` sh
40
- docker compose exec -T php-fpm ./vendor/bin/phpunit tests
40
+ docker compose exec -T php-fpm ./vendor/bin/phpunit --coverage-text --testdox tests
41
41
```
42
42
43
43
## Example PHPUnit Test
@@ -49,13 +49,17 @@ An example PHPUnit test is included in the `tests` directory:
49
49
50
50
<?php
51
51
52
+ declare(strict_types=1);
53
+
52
54
use PHPUnit\Framework\TestCase;
55
+ use App\Example;
53
56
54
57
class ExampleTest extends TestCase
55
58
{
56
59
public function testExample()
57
60
{
58
- $this->assertTrue(true);
61
+ $example = new Example();
62
+ $this->assertTrue($example->doSomething());
59
63
}
60
64
}
61
65
```
You can’t perform that action at this time.
0 commit comments