Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@
}
},
"suggest": {
"jasonmccreary/laravel-test-assertions": "A set of helpful assertions when testing Laravel applications"
"jasonmccreary/laravel-test-assertions": "Required to use additional assertions in generated tests (^1.0)."
}
}
4 changes: 2 additions & 2 deletions src/Generators/TestGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ private function addFakerTrait(Controller $controller)

private function addTestAssertionsTrait(Controller $controller)
{
$this->addImport($controller, 'JMac\\Testing\\Traits\HttpTestAssertions');
$this->addTrait($controller, 'HttpTestAssertions');
$this->addImport($controller, 'JMac\\Testing\\Traits\AdditionalAssertions');
$this->addTrait($controller, 'AdditionalAssertions');
}

private function addRefreshDatabaseTrait(Controller $controller)
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/tests/readme-example.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Mail;
use Illuminate\Support\Facades\Queue;
use JMac\Testing\Traits\HttpTestAssertions;
use JMac\Testing\Traits\AdditionalAssertions;
use Tests\TestCase;

/**
* @see \App\Http\Controllers\PostController
*/
class PostControllerTest extends TestCase
{
use HttpTestAssertions, RefreshDatabase, WithFaker;
use AdditionalAssertions, RefreshDatabase, WithFaker;

/**
* @test
Expand Down
4 changes: 2 additions & 2 deletions tests/fixtures/tests/reference-cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
use App\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Illuminate\Foundation\Testing\WithFaker;
use JMac\Testing\Traits\HttpTestAssertions;
use JMac\Testing\Traits\AdditionalAssertions;
use Tests\TestCase;

/**
* @see \App\Http\Controllers\UserController
*/
class UserControllerTest extends TestCase
{
use HttpTestAssertions, RefreshDatabase, WithFaker;
use AdditionalAssertions, RefreshDatabase, WithFaker;

/**
* @test
Expand Down