Skip to content

Commit db7b805

Browse files
authored
Merge pull request #1 from yzen-dev/dev
Dev
2 parents f193738 + 66866d8 commit db7b805

File tree

9 files changed

+224
-352
lines changed

9 files changed

+224
-352
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# LaravelRouteCoverage
2+
3+
Laravel route coverage report.
4+
5+
With this package you can see the percentage of test coverage of your endpoint's. Unless of course you do it through Laravel or PHPUnit tests.
6+
How it works?
7+
First, we scan the entire directory where the tests are stored, and look for all the http calls there. After that, we take all the routes of the project and combine it into a single report.
8+
9+
## :scroll: **Installation**
10+
The package can be installed via composer:
11+
```
12+
composer require yzen.dev/laravel-route-coverage
13+
```
14+
15+
## :scroll: **Usage**
16+
17+
Generate report:
18+
```
19+
php artisan route:coverage
20+
```
21+
After executing the command, the result of the report will be displayed in the console in the following form:
22+
23+
![image](https://user-images.githubusercontent.com/24630195/121243805-d181c080-c8a6-11eb-9752-b27355a7c26e.png)
24+
25+
26+
Also the html report will be saved in the public/route-coverage directory:
27+
28+
![image](https://user-images.githubusercontent.com/24630195/121243718-b747e280-c8a6-11eb-902d-6be093ec0cf8.png)

composer.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010
"route",
1111
"coverage"
1212
],
13+
"support": {
14+
"issues": "https://github.com/yzen-dev/laravel-route-coverage/issues",
15+
"source": "https://github.com/yzen-dev/laravel-route-coverage"
16+
},
1317
"authors": [
1418
{
1519
"name": "Andey Iatsenko",
@@ -25,8 +29,11 @@
2529
"php": "^7.2 || ^8.0",
2630
"illuminate/console": "^v7.0"
2731
},
28-
"support": {
29-
"issues": "https://github.com/yzen-dev/laravel-route-coverage/issues",
30-
"source": "https://github.com/yzen-dev/laravel-route-coverage"
32+
"extra": {
33+
"laravel": {
34+
"providers": [
35+
"LaravelRouteCoverage\\ServiceProvider"
36+
]
37+
}
3138
}
3239
}

composer.lock

Lines changed: 95 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/Commands/GenerateReportCommand.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use Illuminate\Console\Command;
66
use LaravelRouteCoverage\RouteCoverage;
7+
use LaravelRouteCoverage\Report\Html\Reporter as HtmlReporter;
78

89
/**
910
* Class StatusCommand
@@ -41,5 +42,6 @@ public function handle()
4142
$data,
4243
'box-double'
4344
);
45+
(new HtmlReporter(['app_path'=>app_path()]))->generate($parser);
4446
}
4547
}

src/Report/Csv/Reporter.php

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)