Skip to content

Commit 1c29d53

Browse files
Merge pull request #606 from BinarCode/fix-tests
Fix tests
2 parents 0454e21 + 3738783 commit 1c29d53

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed

.github/workflows/psalm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2
1818
with:
19-
php-version: '8.1'
19+
php-version: '8.2'
2020
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
2121
coverage: none
2222

src/Traits/AuthorizableModels.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,10 @@ public function authorizeToAttach(Request $request, $method, $model): bool
111111
: abort(403, "Missing method [$method] in your [$policyClass] policy.");
112112

113113
if ($authorized === false) {
114-
abort(403,
115-
'You cannot attach model:'.get_class($model).', to the model:'.get_class($this->model()).', check your permissions.');
114+
abort(
115+
403,
116+
'You cannot attach model:'.get_class($model).', to the model:'.get_class($this->model()).', check your permissions.'
117+
);
116118
}
117119

118120
return false;
@@ -131,8 +133,10 @@ public function authorizeToSync(Request $request, $method, Collection $keys): bo
131133
: abort(403, "Missing method [$method] in your [$policyClass] policy.");
132134

133135
if ($authorized === false) {
134-
abort(403,
135-
'You cannot sync key to the model:'.get_class($this->model()).', check your permissions.');
136+
abort(
137+
403,
138+
'You cannot sync key to the model:'.get_class($this->model()).', check your permissions.'
139+
);
136140
}
137141

138142
return false;

tests/Feature/AuthorizableModelsTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ protected function setUp(): void
2121
parent::setUp();
2222

2323
config()->set('restify.cache.policies.enabled', true);
24+
config()->set('cache.default', 'file');
2425

2526
$_SERVER['restify.post.allowRestify'] = true;
2627

tests/Unit/RepositoriesResolvedFromNamespaceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public function test_repository_can_be_resolved_from_app_namespace(): void
4848
}
4949

5050
#[DataProvider('repositoryPathsFromFixtures')]
51-
public function test_repository_can_be_resolved_from_any_namespace(string $directory, string $namespace): void
51+
public function test_repository_can_be_resolved_from_any_namespace(string $directory, string $namespace, string $serviceProvider): void
5252
{
5353
Restify::repositoriesFrom(
5454
directory: $directory,

0 commit comments

Comments
 (0)