1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-02-09 13:28:29 +01:00
phorge-phorge/src/infrastructure/markup/__tests__/PhutilSafeHTMLTestCase.php

20 lines
498 B
PHP
Raw Normal View History

<?php
final class PhutilSafeHTMLTestCase extends PhutilTestCase {
public function testOperator() {
if (!extension_loaded('operator')) {
$this->assertSkipped(pht('Operator extension not available.'));
}
$a = phutil_tag('a');
$ab = $a.phutil_tag('b');
$this->assertEqual('<a></a><b></b>', $ab->getHTMLContent());
$this->assertEqual('<a></a>', $a->getHTMLContent());
$a .= phutil_tag('a');
$this->assertEqual('<a></a><a></a>', $a->getHTMLContent());
}
}