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 app/Models/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @property \Illuminate\Support\Carbon|null $updated_at
*
* Relations
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<\Illuminate\Notifications\DatabaseNotification> $notifications
* @property-read \Illuminate\Notifications\DatabaseNotificationCollection<int, \Illuminate\Notifications\DatabaseNotification> $notifications
* @property-read \Illuminate\Database\Eloquent\Collection<int, \App\Models\Post> $posts
*
* @method static \Database\Factories\UserFactory factory(...$parameters)
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"ergebnis/composer-normalize": "^2.28",
"fakerphp/faker": "^1.9.1",
"haydenpierce/class-finder": "^0.5",
"larastan/larastan": "^2",
"larastan/larastan": "^3",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8",
"phpunit/phpunit": "^11"
Expand Down
213 changes: 85 additions & 128 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
colors="true"
>
<testsuites>
<testsuite name="Unit">
<directory>tests/Unit</directory>
</testsuite>
<testsuite name="Feature">
<directory>tests/Feature</directory>
</testsuite>
Expand Down
9 changes: 3 additions & 6 deletions tests/CreatesApplication.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,13 @@
namespace Tests;

use Illuminate\Contracts\Console\Kernel;
use Illuminate\Foundation\Application;

trait CreatesApplication
{
/**
* Creates the application.
*
* @return \Illuminate\Foundation\Application
*/
public function createApplication()
public function createApplication(): Application
{
/** @var Application $app */
$app = require __DIR__.'/../bootstrap/app.php';

$app->make(Kernel::class)->bootstrap();
Expand Down
15 changes: 5 additions & 10 deletions tests/Feature/Models/PostTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

namespace Tests\Feature\Models;

use App\Models\Post;
use App\Models\User;
use Illuminate\Foundation\Testing\RefreshDatabase;
use Tests\TestCase;
Expand All @@ -16,10 +15,6 @@ public function test_create_post(): void
$user = User::factory()->createOne();
$this->be($user);

$id = Post::max('id') + 1;
$title = 'Some title';
$content = 'Some content';

$this
->graphQL(/** @lang GraphQL */ '
mutation ($title: String!, $content: String!) {
Expand All @@ -33,15 +28,15 @@ public function test_create_post(): void
}
}
', [
'title' => $title,
'content' => $content,
'title' => 'Some title',
'content' => 'Some content',
])
->assertExactJson([
'data' => [
'createPost' => [
'id' => "$id",
'title' => $title,
'content' => $content,
'id' => '1',
'title' => 'Some title',
'content' => 'Some content',
]
]
]);
Expand Down
Loading