mirror of
https://github.com/flarum/core.git
synced 2025-08-17 22:01:44 +02:00
test: php 8.4 (#4103)
* test: php 8.4 * fix: php 8.4 deprecations * fix: make argument required * chore: review changes
This commit is contained in:
@@ -64,7 +64,7 @@ class LikePostTest extends TestCase
|
||||
|
||||
#[Test]
|
||||
#[DataProvider('allowedUsersToLike')]
|
||||
public function can_like_a_post_if_allowed(int $postId, ?int $authenticatedAs, string $message, bool $canLikeOwnPost = null)
|
||||
public function can_like_a_post_if_allowed(int $postId, ?int $authenticatedAs, string $message, ?bool $canLikeOwnPost = null)
|
||||
{
|
||||
if (! is_null($canLikeOwnPost)) {
|
||||
$this->setting('flarum-likes.like_own_post', $canLikeOwnPost);
|
||||
@@ -82,7 +82,7 @@ class LikePostTest extends TestCase
|
||||
|
||||
#[Test]
|
||||
#[DataProvider('unallowedUsersToLike')]
|
||||
public function cannot_like_a_post_if_not_allowed(int $postId, ?int $authenticatedAs, string $message, bool $canLikeOwnPost = null)
|
||||
public function cannot_like_a_post_if_not_allowed(int $postId, ?int $authenticatedAs, string $message, ?bool $canLikeOwnPost = null)
|
||||
{
|
||||
if (! is_null($canLikeOwnPost)) {
|
||||
$this->setting('flarum-likes.like_own_post', $canLikeOwnPost);
|
||||
@@ -100,7 +100,7 @@ class LikePostTest extends TestCase
|
||||
|
||||
#[Test]
|
||||
#[DataProvider('allowedUsersToLike')]
|
||||
public function can_dislike_a_post_if_liked_and_allowed(int $postId, ?int $authenticatedAs, string $message, bool $canLikeOwnPost = null)
|
||||
public function can_dislike_a_post_if_liked_and_allowed(int $postId, ?int $authenticatedAs, string $message, ?bool $canLikeOwnPost = null)
|
||||
{
|
||||
if (! is_null($canLikeOwnPost)) {
|
||||
$this->setting('flarum-likes.like_own_post', $canLikeOwnPost);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<phpunit
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||
xsi:noNamespaceSchemaLocation="../../../vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
backupStaticProperties="false"
|
||||
|
Reference in New Issue
Block a user