Want to access all of our courses? (30 h 33 min)
You also get:
Already a member? Login here
Grate course trying to work with the dyrynda Laravel cascade soft deletes 4.3 however when I tune the phpUnit test I get the following Error:
FAIL Tests\Feature\ProfileTest ✓ profile page is displayed 0.04s ✓ profile information can be updated 0.03s ✓ email verification status is unchanged when the email address is unchanged 0.03s ⨯ user can delete their account 0.35s ✓ correct password must be provided to delete account 0.08s ────────────────────────────────────────────────────────────────────────────────────────────────────────── FAILED Tests\Feature\ProfileTest > user can delete their account Expected response status code [201, 301, 302, 303, 307, 308] but received 500.Failed asserting that false is true. The following exception occurred during the last request: Dyrynda\Database\Support\CascadeSoftDeleteException: Relationship [companies] must exist and return an objectof type Illuminate\Database\Eloquent\Relations\Relation in C:\xampp\htdocs\imr\ironmanrecycling\vendor\dyrynda\laravel-cascade-soft-deletes\src\CascadeSoftDeleteException.php:18 Relationship [companies] must exist and return an object of type Illuminate\Database\Eloquent\Relations\Relation at tests\Feature\ProfileTest.php:76 72▕ ]); 73▕ 74▕ $response 75▕ ->assertSessionHasNoErrors() ➜ 76▕ ->assertRedirect('/'); 77▕ 78▕ $this->assertGuest(); 79▕ $this->assertSoftDeleted($user->fresh()); 80▕ } Tests: 1 failed, 25 passed (55 assertions) Duration: 3.35s
Any suggestions? Ps The soft delete did work befor I changed to this CascadeSoftDeletes.
removed the CascadeSoftDeletes and it passes.
Tell us what you like or what we can improve
Feel free to share anything you like or dislike about this page or the platform in general.
Your feedback has been received. We truly appreciate you taking the time to help us improve.
Grate course trying to work with the dyrynda Laravel cascade soft deletes 4.3 however when I tune the phpUnit test I get the following Error:
Any suggestions? Ps The soft delete did work befor I changed to this CascadeSoftDeletes.
removed the CascadeSoftDeletes and it passes.