Skip to content

Commit

Permalink
Fix unit tests: lazy-resolve uuid for Panel models
Browse files Browse the repository at this point in the history
  • Loading branch information
distantnative committed Jul 22, 2024
1 parent d621c05 commit 93e92a1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Panel/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ public function props(): array
'template' => $file->template(),
'type' => $file->type(),
'url' => $file->url(),
'uuid' => $file->uuid()?->toString(),
'uuid' => fn () => $file->uuid()?->toString(),
],
'preview' => [
'focusable' => $this->isFocusable(),
Expand Down
2 changes: 1 addition & 1 deletion src/Panel/Page.php
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ public function props(): array
'previewUrl' => $page->previewUrl(),
'status' => $page->status(),
'title' => $page->title()->toString(),
'uuid' => $page->uuid()?->toString(),
'uuid' => fn () => $page->uuid()?->toString(),
],
'status' => function () use ($page) {
if ($status = $page->status()) {
Expand Down
2 changes: 1 addition & 1 deletion src/Panel/Site.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public function props(): array
'link' => $this->url(true),
'previewUrl' => $this->model->previewUrl(),
'title' => $this->model->title()->toString(),
'uuid' => $this->model->uuid()?->toString(),
'uuid' => fn () => $this->model->uuid()?->toString(),
]
];
}
Expand Down
2 changes: 1 addition & 1 deletion src/Panel/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public function props(): array
'name' => $user->name()->toString(),
'role' => $user->role()->title(),
'username' => $user->username(),
'uuid' => $user->uuid()?->toString()
'uuid' => fn () => $user->uuid()?->toString()
]
];
}
Expand Down

0 comments on commit 93e92a1

Please sign in to comment.