-
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49f5bd1
commit 1184e93
Showing
2 changed files
with
20 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
<?php | ||
|
||
/* | ||
* This file is part of fof/polls. | ||
* | ||
* Copyright (c) FriendsOfFlarum. | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace FoF\Polls\Tests\integration\api; | ||
|
||
use Flarum\Testing\integration\RetrievesAuthorizedUsers; | ||
|
@@ -8,7 +17,7 @@ | |
class ForumSerializerTest extends TestCase | ||
{ | ||
use RetrievesAuthorizedUsers; | ||
|
||
public function setUp(): void | ||
{ | ||
parent::setUp(); | ||
|
@@ -18,13 +27,13 @@ public function setUp(): void | |
$this->prepareDatabase([ | ||
'users' => [ | ||
$this->normalUser(), | ||
['id' => 3, 'username' => 'pollsuser', 'email' => '[email protected]', 'password' => 'too-obscure', 'is_email_confirmed' => 1] | ||
['id' => 3, 'username' => 'pollsuser', 'email' => '[email protected]', 'password' => 'too-obscure', 'is_email_confirmed' => 1], | ||
], | ||
'group_user' => [ | ||
['user_id' => 3, 'group_id' => 4] | ||
['user_id' => 3, 'group_id' => 4], | ||
], | ||
'group_permission' => [ | ||
['permission' => 'discussion.polls.start', 'group_id' => 4] | ||
['permission' => 'discussion.polls.start', 'group_id' => 4], | ||
], | ||
]); | ||
} | ||
|
@@ -52,7 +61,7 @@ public function normal_user_does_not_have_discussion_polls_start_permission() | |
{ | ||
$response = $this->send( | ||
$this->request('GET', '/api', [ | ||
'authenticatedAs' => 2 | ||
'authenticatedAs' => 2, | ||
]) | ||
); | ||
|
||
|
@@ -70,7 +79,7 @@ public function user_with_discussion_polls_start_permission_has_discussion_polls | |
{ | ||
$response = $this->send( | ||
$this->request('GET', '/api', [ | ||
'authenticatedAs' => 3 | ||
'authenticatedAs' => 3, | ||
]) | ||
); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters