mautic / app /bundles /LeadBundle /Tests /Entity /DoNotContactTest.php
chrisbryan17's picture
Upload folder using huggingface_hub
d2897cd verified
<?php
namespace Mautic\LeadBundle\Tests\Entity;
use Mautic\LeadBundle\Entity\DoNotContact;
class DoNotContactTest extends \PHPUnit\Framework\TestCase
{
public function testDoNotContactComments(): void
{
$doNotContact = new DoNotContact();
$doNotContact->setComments(null);
$this->assertSame('', $doNotContact->getComments());
$comment = '<script>alert(\'x\')</script>';
$doNotContact->setComments($comment);
$this->assertNotSame($comment, $doNotContact->getComments());
$this->assertSame('alert(\'x\')', $doNotContact->getComments());
}
}