Page MenuHomec4science

PhutilSafeHTMLTestCase.php
No OneTemporary

File Metadata

Created
Sun, Dec 22, 21:15

PhutilSafeHTMLTestCase.php

<?php
final class PhutilSafeHTMLTestCase extends PhutilTestCase {
public function testOperator() {
if (!extension_loaded('operator')) {
$this->assertSkipped('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());
}
}

Event Timeline