Skip to content

Commit

Permalink
add morphOne example
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlwirkus committed Jul 20, 2024
1 parent 27b3eb8 commit 2a51bb6
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions tests/Integration/Execution/MutationExecutor/MorphOneTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -369,4 +369,46 @@ public function testUpdateAndDeleteMorphOne(string $action): void
],
]);
}

public function testNestedConnectMorphOne()

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^11 and lowest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^9 and highest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.1 with Laravel ^9 and highest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^10 and highest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.1 with Laravel ^10 and highest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^9 and highest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^11 and highest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^11 and lowest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.0 with Laravel ^9 and highest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^11 and highest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^10 and highest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^10 and lowest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^10 and lowest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.1 with Laravel ^9 and lowest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.3 with Laravel ^9 and lowest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.2 with Laravel ^9 and lowest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.1 with Laravel ^10 and lowest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.

Check failure on line 373 in tests/Integration/Execution/MutationExecutor/MorphOneTest.php

View workflow job for this annotation

GitHub Actions / PHPStan on PHP 8.0 with Laravel ^9 and lowest dependencies

Method Tests\Integration\Execution\MutationExecutor\MorphOneTest::testNestedConnectMorphOne() has no return type specified.
{
$task = factory(Task::class)->create();
assert($task instanceof Task);

$image = factory(Image::class)->create();
assert($image instanceof Image);

$this->graphQL(/** @lang GraphQL */ '
mutation UpdateTask($input: UpdateTaskInput!){
updateTask(input: $input) {
id
name
image {
url
}
}
}
', [
'input' => [
'id' => $task->id,
'name' => 'foo',
'image' => [
'upsert' => [
'id' => $image->id,
'url' => 'foo',
],
],
],
])->assertJson([
'data' => [
'updateTask' => [
'id' => '1',
'name' => 'foo',
'image' => [
'url' => 'foo',
],
],
],
]);
}
}

0 comments on commit 2a51bb6

Please sign in to comment.