From 44573f4016e01db6deab970b9731a2340d3e948f Mon Sep 17 00:00:00 2001 From: ninobaldo Date: Wed, 23 Apr 2014 16:31:39 -0300 Subject: [PATCH] fix bug: Command class "Davispeixoto\TestGenerator\Commands\TestsGeneratorCommand" is not correctly initialized. You probably forgot to call the parent constructor. in laravel 4.1 and fix command name on readme. --- README.md | 6 +++--- .../TestGenerator/Commands/TestsGeneratorCommand.php | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 55d0a3e..15d259c 100644 --- a/README.md +++ b/README.md @@ -32,20 +32,20 @@ Once this operation completes, the final step is to add the service provider. Op 'Davispeixoto\Testingtool\TestingtoolServiceProvider' -That's it! You're all set to go. Run the `artisan` command from the Terminal to see the new `generate:tests` commands. +That's it! You're all set to go. Run the `artisan` command from the Terminal to see the new `tests:generate` commands. php artisan Usage ----- -Use `generate:tests` when you need to create a new PHPUnit test class. +Use `tests:generate` when you need to create a new PHPUnit test class. Here's an example: ```bash php artisan controller:make UserController -php artisan generate:tests UserController +php artisan tests:generate UserController ``` This will generate a resource controller and a test class `app/tests/UserControllerTest.php` as follows: diff --git a/src/Davispeixoto/TestGenerator/Commands/TestsGeneratorCommand.php b/src/Davispeixoto/TestGenerator/Commands/TestsGeneratorCommand.php index e8dddf8..35e8bf3 100644 --- a/src/Davispeixoto/TestGenerator/Commands/TestsGeneratorCommand.php +++ b/src/Davispeixoto/TestGenerator/Commands/TestsGeneratorCommand.php @@ -25,6 +25,7 @@ class TestsGeneratorCommand extends Command { public function __construct() { + parent::__construct(); $this->generator = new Generator(); }