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 Jan 3, 2025
1 parent 1247c51 commit 86b56eb
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 9 deletions.
22 changes: 16 additions & 6 deletions tests/integration/Api/NullIPTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<?php

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

namespace FoF\GeoIP\Tests\integration\Api;

use Carbon\Carbon;
Expand All @@ -9,7 +18,7 @@
class NullIPTest extends TestCase
{
use RetrievesAuthorizedUsers;

public function setUp(): void
{
parent::setUp();
Expand All @@ -29,17 +38,18 @@ public function setUp(): void
]);
}

public function userTypes() : array
public function userTypes(): array
{
return [
[null],
[1],
[2]
[2],
];
}

/**
* @test
*
* @dataProvider userTypes
*/
public function can_show_discussion_with_null_ip(?int $userId)
Expand Down Expand Up @@ -81,10 +91,10 @@ public function can_edit_post_with_null_ip()
$response = $this->send(
$this->request('PATCH', '/api/posts/1', [
'authenticatedAs' => 1,
'json' => [
'json' => [
'data' => [
'type' => 'posts',
'id' => '1',
'type' => 'posts',
'id' => '1',
'attributes' => [
'content' => 'foo bar - edited',
],
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/geoip.
*
* 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 86b56eb

Please sign in to comment.