-
-
Notifications
You must be signed in to change notification settings - Fork 143
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #327 - emojis no longer displaying correctly
- Loading branch information
Showing
2 changed files
with
50 additions
and
18 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
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
use ICal\ICal; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class CleanCharacterTest extends TestCase | ||
{ | ||
// phpcs:disable Generic.Arrays.DisallowLongArraySyntax | ||
// phpcs:disable Squiz.Commenting.FunctionComment | ||
|
||
protected static function getMethod($name) | ||
{ | ||
$class = new ReflectionClass(ICal::class); | ||
$method = $class->getMethod($name); | ||
|
||
// < PHP 8.1.0 | ||
$method->setAccessible(true); | ||
|
||
return $method; | ||
} | ||
|
||
public function testCleanCharacters() | ||
{ | ||
$ical = new ICal(); | ||
$input = 'Test with emoji 🔴👍🏻'; | ||
|
||
self::assertSame( | ||
self::getMethod('cleanCharacters')->invokeArgs($ical, array($input)), | ||
$input | ||
); | ||
} | ||
} |