Skip to content

Commit

Permalink
Remove deprecated Assert class
Browse files Browse the repository at this point in the history
  • Loading branch information
jessarcher committed Mar 8, 2024
1 parent 861e990 commit 95fe2ac
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 1,200 deletions.
92 changes: 0 additions & 92 deletions src/Testing/Assert.php

This file was deleted.

13 changes: 2 additions & 11 deletions src/Testing/TestResponseMacros.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@
namespace Inertia\Testing;

use Closure;
use Illuminate\Testing\Fluent\AssertableJson;

class TestResponseMacros
{
public function assertInertia()
{
return function (Closure $callback = null) {
if (class_exists(AssertableJson::class)) {
$assert = AssertableInertia::fromTestResponse($this);
} else {
$assert = Assert::fromTestResponse($this);
}
$assert = AssertableInertia::fromTestResponse($this);

if (is_null($callback)) {
return $this;
Expand All @@ -29,11 +24,7 @@ public function assertInertia()
public function inertiaPage()
{
return function () {
if (class_exists(AssertableJson::class)) {
return AssertableInertia::fromTestResponse($this)->toArray();
}

return Assert::fromTestResponse($this)->toArray();
return AssertableInertia::fromTestResponse($this)->toArray();
};
}
}
Loading

0 comments on commit 95fe2ac

Please sign in to comment.