Skip to content

Commit bfff228

Browse files
committed
Added docblocks
1 parent 18a47d8 commit bfff228

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

src/Testing/AssertableInertia.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ public function version(string $value): self
8282
return $this;
8383
}
8484

85+
/**
86+
* Reload the Inertia page and perform assertions on the response.
87+
*/
8588
public function reload(?Closure $callback = null, array|string|null $only = null, array|string|null $except = null): self
8689
{
8790
if (is_array($only)) {
@@ -114,6 +117,9 @@ public function reload(?Closure $callback = null, array|string|null $only = null
114117
return $this;
115118
}
116119

120+
/**
121+
* Reload the Inertia page as a partial request with only the specified props.
122+
*/
117123
public function reloadOnly(array|string $only, ?Closure $callback = null): self
118124
{
119125
return $this->reload(only: $only, callback: function (AssertableInertia $assertable) use ($only, $callback) {
@@ -125,6 +131,9 @@ public function reloadOnly(array|string $only, ?Closure $callback = null): self
125131
});
126132
}
127133

134+
/**
135+
* Reload the Inertia page as a partial request excluding the specified props.
136+
*/
128137
public function reloadExcept(array|string $except, ?Closure $callback = null): self
129138
{
130139
return $this->reload(except: $except, callback: function (AssertableInertia $assertable) use ($except, $callback) {

src/Testing/ReloadRequest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ class ReloadRequest
1111
{
1212
use MakesHttpRequests;
1313

14+
/**
15+
* Create a new Inertia reload request instance.
16+
*/
1417
public function __construct(
1518
protected string $url,
1619
protected string $component,
@@ -22,6 +25,9 @@ public function __construct(
2225
$this->app ??= app();
2326
}
2427

28+
/**
29+
* Request the Inertia page as a partial reload.
30+
*/
2531
public function __invoke(): TestResponse
2632
{
2733
$headers = [Header::VERSION => $this->version];

0 commit comments

Comments
 (0)