Skip to content

Commit 958e477

Browse files
Test dox (#491)
* Testdox * Apply fixes from StyleCI Co-authored-by: StyleCI Bot <[email protected]>
1 parent 7285dce commit 958e477

10 files changed

+33
-3
lines changed

composer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,6 @@
5858
"minimum-stability": "dev",
5959
"prefer-stable": true,
6060
"scripts": {
61-
"phpunit": "vendor/bin/phpunit"
61+
"phpunit": "vendor/bin/phpunit --testdox"
6262
}
6363
}

phpunit.xml

+9-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd"
4+
bootstrap="vendor/autoload.php"
5+
colors="true"
6+
convertErrorsToExceptions="true"
7+
convertNoticesToExceptions="true"
8+
convertWarningsToExceptions="true"
9+
stopOnFailure="false"
10+
>
311
<coverage>
412
<include>
513
<directory suffix=".php">src/</directory>

src/L5SwaggerFacade.php

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
class L5SwaggerFacade extends Facade
88
{
99
/**
10+
* @codeCoverageIgnore
11+
*
1012
* @return string
1113
*/
1214
protected static function getFacadeAccessor(): string

src/L5SwaggerServiceProvider.php

+2
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public function register()
6161
/**
6262
* Get the services provided by the provider.
6363
*
64+
* @codeCoverageIgnore
65+
*
6466
* @return array
6567
*/
6668
public function provides()

tests/ConfigFactoryTest.php

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44

55
use L5Swagger\Exceptions\L5SwaggerException;
66

7+
/**
8+
* @testdox Configuration factory
9+
*/
710
class ConfigFactoryTest extends TestCase
811
{
912
/**
1013
* @test
1114
*/
12-
public function ifThrowsExceptionIfDocumentationConfigNotFound(): void
15+
public function itThrowsExceptionIfDocumentationConfigNotFound(): void
1316
{
1417
$config = config('l5-swagger');
1518
unset($config['documentations']['default']);

tests/ConsoleTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
use Illuminate\Support\Facades\Artisan;
77
use L5Swagger\Exceptions\L5SwaggerException;
88

9+
/**
10+
* @testdox Console commands
11+
*/
912
class ConsoleTest extends TestCase
1013
{
1114
/**

tests/GeneratorTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
use Symfony\Component\Yaml\Parser;
1010
use Symfony\Component\Yaml\Yaml;
1111

12+
/**
13+
* @testdox Generator
14+
*/
1215
class GeneratorTest extends TestCase
1316
{
1417
/** @test **/

tests/HelpersTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44

55
use L5Swagger\Exceptions\L5SwaggerException;
66

7+
/**
8+
* @testdox Helpers
9+
*/
710
class HelpersTest extends TestCase
811
{
912
/** @test */

tests/RoutesTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
use L5Swagger\GeneratorFactory;
88
use PHPUnit\Framework\MockObject\MockObject;
99

10+
/**
11+
* @testdox Routes
12+
*/
1013
class RoutesTest extends TestCase
1114
{
1215
/** @test */

tests/SecurityDefinitionsTest.php

+3
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@
55
use Illuminate\Filesystem\Filesystem;
66
use L5Swagger\Exceptions\L5SwaggerException;
77

8+
/**
9+
* @testdox Security definition
10+
*/
811
class SecurityDefinitionsTest extends TestCase
912
{
1013
/**

0 commit comments

Comments
 (0)