Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
vmcj committed Jul 2, 2024
1 parent 5015dba commit 200619a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion webapp/tests/Unit/Controller/API/BaseTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,6 @@ public function provideSingleNotFound(): Generator
protected function provideAllowedUsers(): Generator
{
yield ['admin', ['admin']];
yield ['team', ['api_problem_change']];
yield ['team', [static::$testedRole]];

Check failure on line 380 in webapp/tests/Unit/Controller/API/BaseTestCase.php

View workflow job for this annotation

GitHub Actions / phpstan

Access to an undefined static property static(App\Tests\Unit\Controller\API\BaseTestCase)::$testedRole.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
class ContestControllerAdminTest extends ContestControllerTest
{
protected ?string $apiUser = 'admin';
protected static string $testedRole = 'api_problem_change';

private function parseSortYaml(string $yamlString): array
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
class ProblemControllerAdminTest extends ProblemControllerTest
{
protected ?string $apiUser = 'admin';
protected static string $testedRole = 'api_problem_change';

protected function setUp(): void
{
Expand Down

0 comments on commit 200619a

Please sign in to comment.