Skip to content

Commit

Permalink
Apply fixes from StyleCI
Browse files Browse the repository at this point in the history
  • Loading branch information
StyleCIBot committed Oct 3, 2023
1 parent 3bdae6a commit a674f04
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
23 changes: 15 additions & 8 deletions tests/integration/api/ForumAttributeTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

/*
* This file is part of fof/user-directory.
*
* Copyright (c) FriendsOfFlarum.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace FoF\UserDirectory\tests\integration\api;

use Flarum\Testing\integration\RetrievesAuthorizedUsers;
Expand All @@ -8,7 +17,7 @@
class ForumAttributeTest extends TestCase
{
use RetrievesAuthorizedUsers;

public function setUp(): void
{
parent::setUp();
Expand All @@ -28,7 +37,7 @@ protected function normalUserDirectoryPermission()
'group_permission' => [
[
'permission' => 'fof.user-directory.view',
'group_id' => 3,
'group_id' => 3,
],
],
]);
Expand All @@ -40,7 +49,7 @@ protected function guestUserDirectoryPermission()
'group_permission' => [
[
'permission' => 'fof.user-directory.view',
'group_id' => 2,
'group_id' => 2,
],
],
]);
Expand Down Expand Up @@ -73,7 +82,7 @@ public function admin_does_not_have_user_directory_link_when_setting_disabled()
public function admin_has_user_directory_link_when_setting_enabled()
{
$this->setting('fof-user-directory.admin.settings.link', true);

$response = $this->send(
$this->request(
'GET',
Expand All @@ -90,8 +99,6 @@ public function admin_has_user_directory_link_when_setting_enabled()
$this->assertTrue($data['data']['attributes']['canSeeUserDirectoryLink']);
}



/**
* @test
*/
Expand Down Expand Up @@ -119,7 +126,7 @@ public function normal_user_does_not_have_user_directory_link_by_default()
public function normal_user_does_not_have_user_directory_link_when_permission_is_granted_and_default_setting()
{
$this->normalUserDirectoryPermission();

$response = $this->send(
$this->request(
'GET',
Expand Down Expand Up @@ -231,7 +238,7 @@ public function guest_does_not_have_user_directory_link_by_default()
public function guest_does_not_have_user_directory_link_when_permission_is_granted_and_default_setting()
{
$this->guestUserDirectoryPermission();

$response = $this->send(
$this->request(
'GET',
Expand Down
8 changes: 5 additions & 3 deletions tests/integration/setup.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?php

/*
* This file is part of Flarum.
* This file is part of fof/user-directory.
*
* For detailed copyright and license information, please view the
* LICENSE file that was distributed with this source code.
* Copyright (c) FriendsOfFlarum.
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

use Flarum\Testing\integration\Setup\SetupScript;
Expand Down

0 comments on commit a674f04

Please sign in to comment.