diff --git a/composer.json b/composer.json index 21876a91..bce83664 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,7 @@ }, "autoload": { "psr-4": { - "RonasIT\\Support\\AutoDoc\\": "src/" + "RonasIT\\AutoDoc\\": "src/" }, "exclude-from-classmap": [ "src/Tests/" @@ -36,14 +36,14 @@ }, "autoload-dev": { "psr-4": { - "RonasIT\\Support\\Tests\\": "tests/", - "RonasIT\\Support\\Tests\\Support\\": "tests/support/" + "RonasIT\\AutoDoc\\Tests\\": "tests/", + "RonasIT\\AutoDoc\\Tests\\Support\\": "tests/support/" } }, "extra": { "laravel": { "providers": [ - "RonasIT\\Support\\AutoDoc\\AutoDocServiceProvider" + "RonasIT\\AutoDoc\\AutoDocServiceProvider" ] } } diff --git a/config/auto-doc.php b/config/auto-doc.php index 30b01285..e704fa24 100644 --- a/config/auto-doc.php +++ b/config/auto-doc.php @@ -1,8 +1,8 @@ env('SWAGGER_DRIVER', 'local'), diff --git a/readme.md b/readme.md index dcee86fe..1e1ca85d 100644 --- a/readme.md +++ b/readme.md @@ -39,20 +39,20 @@ passing PHPUnit tests. > ```php > 'providers' => [ > // ... - > RonasIT\Support\AutoDoc\AutoDocServiceProvider::class, + > RonasIT\AutoDoc\AutoDocServiceProvider::class, > ], > ``` 1. Run `php artisan vendor:publish` - 2. Add `\RonasIT\Support\AutoDoc\Http\Middleware\AutoDocMiddleware::class` middleware to the global HTTP middleware stack in `Http/Kernel.php`. - 3. Add `\RonasIT\Support\AutoDoc\Tests\AutoDocTestCaseTrait` trait to `tests/TestCase.php` + 2. Add `\RonasIT\AutoDoc\Http\Middleware\AutoDocMiddleware::class` middleware to the global HTTP middleware stack in `Http/Kernel.php`. + 3. Add `\RonasIT\AutoDoc\Tests\AutoDocTestCaseTrait` trait to `tests/TestCase.php` 4. Configure documentation saving using one of the next ways: - Add `SwaggerExtension` to the `` block of your `phpunit.xml`. **Please note that this way will be removed after updating** **PHPUnit up to 10 version (https://github.com/sebastianbergmann/phpunit/issues/4676)** ```xml - + diff --git a/src/AutoDocServiceProvider.php b/src/AutoDocServiceProvider.php index ec4a2764..0e6d435b 100644 --- a/src/AutoDocServiceProvider.php +++ b/src/AutoDocServiceProvider.php @@ -1,9 +1,9 @@ config('auto-doc.global_prefix')], function () { Route::get('/auto-doc/documentation', ['uses' => AutoDocController::class . '@documentation']); diff --git a/src/Interfaces/SwaggerDriverInterface.php b/src/Interfaces/SwaggerDriverInterface.php index 45ba0fc7..d1b8131c 100644 --- a/src/Interfaces/SwaggerDriverInterface.php +++ b/src/Interfaces/SwaggerDriverInterface.php @@ -1,6 +1,6 @@ getFunctionMock('RonasIT\Support\AutoDoc\Services', 'report'); + $mock = $this->getFunctionMock('RonasIT\AutoDoc\Services', 'report'); $mock->expects($this->once()); config([ @@ -73,7 +73,7 @@ public function testGetJSONDocumentationDoesntExist() public function testGetJSONDocumentationIsEmpty() { - $mock = $this->getFunctionMock('RonasIT\Support\AutoDoc\Services', 'report'); + $mock = $this->getFunctionMock('RonasIT\AutoDoc\Services', 'report'); $mock->expects($this->once()); config([ diff --git a/tests/AutoDocMiddlewareTest.php b/tests/AutoDocMiddlewareTest.php index 05bc2056..0473092a 100644 --- a/tests/AutoDocMiddlewareTest.php +++ b/tests/AutoDocMiddlewareTest.php @@ -1,9 +1,9 @@