aboutsummaryrefslogtreecommitdiffstats
path: root/tests/lib/EmojiHelperTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lib/EmojiHelperTest.php')
-rw-r--r--tests/lib/EmojiHelperTest.php13
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/lib/EmojiHelperTest.php b/tests/lib/EmojiHelperTest.php
index 9ad56b32472..9a89a4b299e 100644
--- a/tests/lib/EmojiHelperTest.php
+++ b/tests/lib/EmojiHelperTest.php
@@ -27,9 +27,8 @@ class EmojiHelperTest extends TestCase {
/**
* @param bool $supports4ByteText
* @param bool $expected
- *
- * @dataProvider doesPlatformSupportEmojiDataProvider
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('doesPlatformSupportEmojiDataProvider')]
public function testDoesPlatformSupportEmoji(bool $supports4ByteText, bool $expected): void {
$this->db->expects($this->once())
->method('supports4ByteText')
@@ -38,10 +37,7 @@ class EmojiHelperTest extends TestCase {
$this->assertEquals($expected, $this->helper->doesPlatformSupportEmoji());
}
- /**
- * @return array
- */
- public function doesPlatformSupportEmojiDataProvider(): array {
+ public static function doesPlatformSupportEmojiDataProvider(): array {
return [
[true, true],
[false, false],
@@ -51,16 +47,15 @@ class EmojiHelperTest extends TestCase {
/**
* @param string $emoji
* @param bool $expected
- *
- * @dataProvider isValidSingleEmojiDataProvider
*/
+ #[\PHPUnit\Framework\Attributes\DataProvider('isValidSingleEmojiDataProvider')]
public function testIsValidSingleEmoji(string $emoji, bool $expected): void {
$actual = $this->helper->isValidSingleEmoji($emoji);
$this->assertEquals($expected, $actual);
}
- public function isValidSingleEmojiDataProvider(): array {
+ public static function isValidSingleEmojiDataProvider(): array {
return [
['📱📠', false],
['a', false],