1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-09-20 13:34:04 +00:00

minor test cleanup

This commit is contained in:
Samuel Stancl 2026-09-08 20:16:57 -07:00
parent d783879f98
commit 9673464128
No known key found for this signature in database
GPG key ID: BA146259A1E16C57
2 changed files with 33 additions and 43 deletions

View file

@ -398,9 +398,10 @@ test('tenant asset controller only serves files inside the asset root', function
pest()->get(tenant_asset('photo.jpg'), ['X-Tenant' => $tenant->id])->assertSuccessful();
// Files outside the asset root, e.g. ones that shouldn't be served.
// The directory with the second file starts with the name of the asset root.
// Files outside the asset root
file_put_contents(storage_path('app/photo.jpg'), 'private file');
// This path starts with the asset root but is a sibling dir, not a child. Regression assertion
mkdir($siblingDirectory = storage_path('app/public-originals'), recursive: true);
file_put_contents($siblingDirectory . '/photo.jpg', 'private file');