Skip to content

Commit

Permalink
✅ Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mckenziearts committed Oct 3, 2023
1 parent 29a3632 commit 724ce17
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 47 deletions.
3 changes: 0 additions & 3 deletions tests/Feature/UserActivitiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\RefreshDatabase;

uses(RefreshDatabase::class);
uses(DatabaseMigrations::class);

it('records activity when an article is created', function (): void {
$user = $this->createUser();

Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/ChannelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use App\Exceptions\CannotAddChannelToChild;
use App\Models\Channel;

test('channel can have childs', function (): void {
test('channel can have children', function (): void {
$channel = Channel::factory()->create();
Channel::factory()->count(2)->create(['parent_id' => $channel->id]);

Expand Down
38 changes: 2 additions & 36 deletions tests/Pest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,39 +5,5 @@
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\RefreshDatabase;

/*
|--------------------------------------------------------------------------
| Test Case
|--------------------------------------------------------------------------
|
| The closure you provide to your test functions is always bound to a specific PHPUnit test
| case class. By default, that class is "PHPUnit\Framework\TestCase". Of course, you may
| need to change it using the "uses()" function to bind a different classes or traits.
|
*/

uses(Tests\TestCase::class, RefreshDatabase::class, DatabaseMigrations::class)->in('Feature', 'Integration', 'Unit');

/*
|--------------------------------------------------------------------------
| Expectations
|--------------------------------------------------------------------------
|
| When you're writing tests, you often need to check that values meet certain conditions. The
| "expect()" function gives you access to a set of "expectations" methods that you can use
| to assert different things. Of course, you may extend the Expectation API at any time.
|
*/

/** @link https://pestphp.com/docs/expectations#custom-expectations */

/*
|--------------------------------------------------------------------------
| Functions
|--------------------------------------------------------------------------
|
| While Pest is very powerful out-of-the-box, you may have some testing code specific to your
| project that you don't want to repeat in every file. Here you can also expose helpers as
| global functions to help you to reduce the number of lines of code in your test files.
|
*/
uses(Tests\TestCase::class, RefreshDatabase::class)
->in('Feature', 'Integration');
7 changes: 0 additions & 7 deletions tests/Unit/ExampleTest.php

This file was deleted.

0 comments on commit 724ce17

Please sign in to comment.