Spaces:
No application file
No application file
File size: 879 Bytes
d2897cd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
<?php
declare(strict_types=1);
namespace Mautic\WebhookBundle\Tests\Entity;
use Mautic\WebhookBundle\Entity\Log;
class LogTest extends \PHPUnit\Framework\TestCase
{
public function testSetNote(): void
{
$log = new Log();
$log->setNote("\x6d\x61\x75\x74\x69\x63");
$this->assertSame('mautic', $log->getNote());
$log->setNote("\x57\xfc\x72\x74\x74\x65\x6d\x62\x65\x72\x67"); // original string is W�rttemberg, in this '�' is invaliad char so it should be removed
$this->assertSame('Wrttemberg', $log->getNote());
$log->setNote('mautic');
$this->assertSame('mautic', $log->getNote());
$log->setNote('ěščřžýá');
$this->assertSame('ěščřžýá', $log->getNote());
$log->setNote('†º5¶2KfNœã');
$this->assertSame('†º5¶2KfNœã', $log->getNote());
}
}
|