Skip to content

Commit

Permalink
Run php-cs-fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
emmachughes authored and github-actions[bot] committed Jan 14, 2025
1 parent 2f4f409 commit 004ed08
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Illuminate\Http\JsonResponse;
use Illuminate\Http\Response;
use League\Fractal\Pagination\IlluminatePaginatorAdapter;

use function fractal;

final readonly class ContextController
Expand Down
1 change: 1 addition & 0 deletions sourcecode/hub/app/Http/Requests/Api/ContentRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Illuminate\Contracts\Auth\Access\Gate;
use Illuminate\Foundation\Http\FormRequest;
use Illuminate\Validation\Rule;

use function array_map;

final class ContentRequest extends FormRequest
Expand Down
63 changes: 32 additions & 31 deletions sourcecode/hub/tests/Feature/Api/ContextTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,40 +25,41 @@ public function testListsContexts(): void
->withBasicAuth($user->getApiKey(), $user->getApiSecret())
->getJson('https://hub-test.edlib.test/api/contexts')
->assertOk()
->assertJson(fn(AssertableJson $json) => $json
->where('data', [
[
'id' => $id1,
'name' => 'context_1',
'links' => [
'self' => 'https://hub-test.edlib.test/api/contexts/context_1',
->assertJson(
fn(AssertableJson $json) => $json
->where('data', [
[
'id' => $id1,
'name' => 'context_1',
'links' => [
'self' => 'https://hub-test.edlib.test/api/contexts/context_1',
],
],
],
[
'id' => $id2,
'name' => 'context_2',
'links' => [
'self' => 'https://hub-test.edlib.test/api/contexts/context_2',
[
'id' => $id2,
'name' => 'context_2',
'links' => [
'self' => 'https://hub-test.edlib.test/api/contexts/context_2',
],
],
],
[
'id' => $id3,
'name' => 'context_3',
'links' => [
'self' => 'https://hub-test.edlib.test/api/contexts/context_3',
[
'id' => $id3,
'name' => 'context_3',
'links' => [
'self' => 'https://hub-test.edlib.test/api/contexts/context_3',
],
],
],
])
->where('meta', [
'pagination' => [
'count' => 3,
'current_page' => 1,
'links' => [],
'per_page' => 100,
'total' => 3,
'total_pages' => 1,
],
])
])
->where('meta', [
'pagination' => [
'count' => 3,
'current_page' => 1,
'links' => [],
'per_page' => 100,
'total' => 3,
'total_pages' => 1,
],
]),
);
}
}

0 comments on commit 004ed08

Please sign in to comment.