diff --git a/src/Illuminate/Testing/Fluent/AssertableJson.php b/src/Illuminate/Testing/Fluent/AssertableJson.php index 3d2496fac71b..9645fe8093c9 100644 --- a/src/Illuminate/Testing/Fluent/AssertableJson.php +++ b/src/Illuminate/Testing/Fluent/AssertableJson.php @@ -86,7 +86,7 @@ protected function scope(string $key, Closure $callback): self PHPUnit::assertIsArray($props, sprintf('Property [%s] is not scopeable.', $path)); - $scope = new self($props, $path); + $scope = new static($props, $path); $callback($scope); $scope->interacted(); @@ -125,7 +125,7 @@ public function first(Closure $callback): self */ public static function fromArray(array $data): self { - return new self($data); + return new static($data); } /** @@ -136,7 +136,7 @@ public static function fromArray(array $data): self */ public static function fromAssertableJsonString(AssertableJsonString $json): self { - return self::fromArray($json->json()); + return static::fromArray($json->json()); } /**