-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from Lomkit/feature/test-commands
✅ commands tests
- Loading branch information
Showing
19 changed files
with
269 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Lomkit\Rest\Tests\Feature\Commands; | ||
|
||
use Illuminate\Bus\PendingBatch; | ||
use Illuminate\Support\Facades\Bus; | ||
use Illuminate\Support\Facades\Gate; | ||
use Lomkit\Rest\Actions\CallRestApiAction; | ||
use Lomkit\Rest\Tests\Feature\TestCase; | ||
use Lomkit\Rest\Tests\Support\Database\Factories\ModelFactory; | ||
use Lomkit\Rest\Tests\Support\Models\Model; | ||
use Lomkit\Rest\Tests\Support\Policies\GreenPolicy; | ||
|
||
class ActionCommandTest extends TestCase | ||
{ | ||
public function test_create_action_class(): void | ||
{ | ||
$this->artisan('rest:action', ['name' => 'TestAction', '--path' => './.phpunit.cache'])->assertOk(); | ||
|
||
$this->assertFileExists('./.phpunit.cache/TestAction.php'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Lomkit\Rest\Tests\Feature\Commands; | ||
|
||
use Illuminate\Bus\PendingBatch; | ||
use Illuminate\Support\Facades\Bus; | ||
use Illuminate\Support\Facades\Gate; | ||
use Lomkit\Rest\Actions\CallRestApiAction; | ||
use Lomkit\Rest\Tests\Feature\TestCase; | ||
use Lomkit\Rest\Tests\Support\Database\Factories\ModelFactory; | ||
use Lomkit\Rest\Tests\Support\Models\Model; | ||
use Lomkit\Rest\Tests\Support\Policies\GreenPolicy; | ||
|
||
class BaseControllerCommandTest extends TestCase | ||
{ | ||
public function test_create_base_controller_class(): void | ||
{ | ||
$this->artisan('rest:base-controller', ['name' => 'TestBaseController', '--path' => './.phpunit.cache'])->assertOk(); | ||
|
||
$this->assertFileExists('./.phpunit.cache/TestBaseController.php'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Lomkit\Rest\Tests\Feature\Commands; | ||
|
||
use Illuminate\Bus\PendingBatch; | ||
use Illuminate\Support\Facades\Bus; | ||
use Illuminate\Support\Facades\Gate; | ||
use Lomkit\Rest\Actions\CallRestApiAction; | ||
use Lomkit\Rest\Tests\Feature\TestCase; | ||
use Lomkit\Rest\Tests\Support\Database\Factories\ModelFactory; | ||
use Lomkit\Rest\Tests\Support\Models\Model; | ||
use Lomkit\Rest\Tests\Support\Policies\GreenPolicy; | ||
|
||
class BaseResourceCommandTest extends TestCase | ||
{ | ||
public function test_create_base_resource_class(): void | ||
{ | ||
$this->artisan('rest:base-resource', ['name' => 'TestBaseResource', '--path' => './.phpunit.cache'])->assertOk(); | ||
|
||
$this->assertFileExists('./.phpunit.cache/TestBaseResource.php'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Lomkit\Rest\Tests\Feature\Commands; | ||
|
||
use Illuminate\Bus\PendingBatch; | ||
use Illuminate\Support\Facades\Bus; | ||
use Illuminate\Support\Facades\Gate; | ||
use Lomkit\Rest\Actions\CallRestApiAction; | ||
use Lomkit\Rest\Tests\Feature\TestCase; | ||
use Lomkit\Rest\Tests\Support\Database\Factories\ModelFactory; | ||
use Lomkit\Rest\Tests\Support\Models\Model; | ||
use Lomkit\Rest\Tests\Support\Policies\GreenPolicy; | ||
|
||
class ControllerCommandTest extends TestCase | ||
{ | ||
public function test_create_controller_class(): void | ||
{ | ||
$this->artisan('rest:controller', ['name' => 'TestController', '--path' => './.phpunit.cache'])->assertOk(); | ||
|
||
$this->assertFileExists('./.phpunit.cache/TestController.php'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Lomkit\Rest\Tests\Feature\Commands; | ||
|
||
use Illuminate\Bus\PendingBatch; | ||
use Illuminate\Support\Facades\Bus; | ||
use Illuminate\Support\Facades\Gate; | ||
use Lomkit\Rest\Actions\CallRestApiAction; | ||
use Lomkit\Rest\Tests\Feature\TestCase; | ||
use Lomkit\Rest\Tests\Support\Database\Factories\ModelFactory; | ||
use Lomkit\Rest\Tests\Support\Models\Model; | ||
use Lomkit\Rest\Tests\Support\Policies\GreenPolicy; | ||
|
||
class DocumentationCommandTest extends TestCase | ||
{ | ||
public function test_create_documentation_class(): void | ||
{ | ||
$this->artisan('rest:documentation', ['--path' => './.phpunit.cache'])->assertOk(); | ||
|
||
$this->assertFileExists('./.phpunit.cache/openapi.json'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Lomkit\Rest\Tests\Feature\Commands; | ||
|
||
use Illuminate\Bus\PendingBatch; | ||
use Illuminate\Support\Facades\Bus; | ||
use Illuminate\Support\Facades\Gate; | ||
use Lomkit\Rest\Actions\CallRestApiAction; | ||
use Lomkit\Rest\Tests\Feature\TestCase; | ||
use Lomkit\Rest\Tests\Support\Database\Factories\ModelFactory; | ||
use Lomkit\Rest\Tests\Support\Models\Model; | ||
use Lomkit\Rest\Tests\Support\Policies\GreenPolicy; | ||
|
||
class InstructionCommandTest extends TestCase | ||
{ | ||
public function test_create_instruction_class(): void | ||
{ | ||
$this->artisan('rest:instruction', ['name' => 'TestInstruction', '--path' => './.phpunit.cache'])->assertOk(); | ||
|
||
$this->assertFileExists('./.phpunit.cache/TestInstruction.php'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Lomkit\Rest\Tests\Feature\Commands; | ||
|
||
use Illuminate\Bus\PendingBatch; | ||
use Illuminate\Support\Facades\Bus; | ||
use Illuminate\Support\Facades\Gate; | ||
use Lomkit\Rest\Actions\CallRestApiAction; | ||
use Lomkit\Rest\Tests\Feature\TestCase; | ||
use Lomkit\Rest\Tests\Support\Database\Factories\ModelFactory; | ||
use Lomkit\Rest\Tests\Support\Models\Model; | ||
use Lomkit\Rest\Tests\Support\Policies\GreenPolicy; | ||
|
||
class ResourceCommandTest extends TestCase | ||
{ | ||
public function test_create_resource_class(): void | ||
{ | ||
$this->artisan('rest:resource', ['name' => 'TestResource', '--path' => './.phpunit.cache'])->assertOk(); | ||
|
||
$this->assertFileExists('./.phpunit.cache/TestResource.php'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Lomkit\Rest\Tests\Feature\Commands; | ||
|
||
use Illuminate\Bus\PendingBatch; | ||
use Illuminate\Support\Facades\Bus; | ||
use Illuminate\Support\Facades\Gate; | ||
use Lomkit\Rest\Actions\CallRestApiAction; | ||
use Lomkit\Rest\Tests\Feature\TestCase; | ||
use Lomkit\Rest\Tests\Support\Database\Factories\ModelFactory; | ||
use Lomkit\Rest\Tests\Support\Models\Model; | ||
use Lomkit\Rest\Tests\Support\Policies\GreenPolicy; | ||
|
||
class ResponseCommandTest extends TestCase | ||
{ | ||
public function test_create_response_class(): void | ||
{ | ||
$this->artisan('rest:response', ['name' => 'TestResponse', '--path' => './.phpunit.cache'])->assertOk(); | ||
|
||
$this->assertFileExists('./.phpunit.cache/TestResponse.php'); | ||
} | ||
} |
Oops, something went wrong.