mirror of
https://github.com/flarum/core.git
synced 2025-08-08 17:36:38 +02:00
chore: update dependencies (#4012)
* chore: phpunit 10 * chore: config * Apply fixes from StyleCI * chore: phpunit 11 (php 8.2 minimum requirement) * feat: laravel 11 * Apply fixes from StyleCI * feat: carbon v3 * fixes
This commit is contained in:
@@ -19,6 +19,7 @@ use Flarum\Testing\integration\TestCase;
|
||||
use Flarum\User\User;
|
||||
use Illuminate\Database\PostgresConnection;
|
||||
use Illuminate\Support\Arr;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
|
||||
class ListTest extends TestCase
|
||||
{
|
||||
@@ -70,9 +71,7 @@ class ListTest extends TestCase
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
#[Test]
|
||||
public function admin_can_see_one_flag_per_visible_post()
|
||||
{
|
||||
$response = $this->send(
|
||||
@@ -96,9 +95,7 @@ class ListTest extends TestCase
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
#[Test]
|
||||
public function regular_user_sees_own_flags_of_visible_posts()
|
||||
{
|
||||
$response = $this->send(
|
||||
@@ -115,9 +112,7 @@ class ListTest extends TestCase
|
||||
$this->assertEqualsCanonicalizing(['2', '4'], $ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
#[Test]
|
||||
public function mod_can_see_one_flag_per_visible_post()
|
||||
{
|
||||
$response = $this->send(
|
||||
@@ -134,9 +129,7 @@ class ListTest extends TestCase
|
||||
$this->assertCount(3, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
#[Test]
|
||||
public function guest_cant_see_flags()
|
||||
{
|
||||
$response = $this->send(
|
||||
|
@@ -19,6 +19,7 @@ use Flarum\Testing\integration\TestCase;
|
||||
use Flarum\User\User;
|
||||
use Illuminate\Support\Arr;
|
||||
use Illuminate\Support\Carbon;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
|
||||
class ListWithTagsTest extends TestCase
|
||||
{
|
||||
@@ -101,9 +102,7 @@ class ListWithTagsTest extends TestCase
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
#[Test]
|
||||
public function admin_can_see_one_flag_per_post()
|
||||
{
|
||||
$response = $this->send(
|
||||
@@ -122,9 +121,7 @@ class ListWithTagsTest extends TestCase
|
||||
$this->assertCount(7, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
#[Test]
|
||||
public function regular_user_sees_own_flags()
|
||||
{
|
||||
$response = $this->send(
|
||||
@@ -141,9 +138,7 @@ class ListWithTagsTest extends TestCase
|
||||
$this->assertEqualsCanonicalizing(['2', '4'], $ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
#[Test]
|
||||
public function mod_can_see_one_flag_per_post()
|
||||
{
|
||||
$response = $this->send(
|
||||
@@ -162,9 +157,7 @@ class ListWithTagsTest extends TestCase
|
||||
$this->assertCount(5, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* @test
|
||||
*/
|
||||
#[Test]
|
||||
public function guest_cant_see_flags()
|
||||
{
|
||||
$response = $this->send(
|
||||
|
@@ -18,6 +18,8 @@ use Flarum\Testing\integration\RetrievesAuthorizedUsers;
|
||||
use Flarum\Testing\integration\TestCase;
|
||||
use Flarum\User\User;
|
||||
use Illuminate\Support\Arr;
|
||||
use PHPUnit\Framework\Attributes\DataProvider;
|
||||
use PHPUnit\Framework\Attributes\Test;
|
||||
|
||||
class IncludeFlagsVisibilityTest extends TestCase
|
||||
{
|
||||
@@ -106,10 +108,8 @@ class IncludeFlagsVisibilityTest extends TestCase
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dataProvider listFlagsIncludesDataProvider
|
||||
* @test
|
||||
*/
|
||||
#[Test]
|
||||
#[DataProvider('listFlagsIncludesDataProvider')]
|
||||
public function user_sees_where_allowed_with_included_tags(int $actorId, array $expectedIncludes)
|
||||
{
|
||||
$response = $this->send(
|
||||
@@ -137,7 +137,7 @@ class IncludeFlagsVisibilityTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function listFlagsIncludesDataProvider(): array
|
||||
public static function listFlagsIncludesDataProvider(): array
|
||||
{
|
||||
return [
|
||||
'admin_sees_all' => [1, [1, 2, 3, 4, 5, 6, 7, 8]],
|
||||
|
Reference in New Issue
Block a user