|
@@ -206,40 +206,43 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
|
|
|
// True
|
|
|
$input='<html>xxx</html>';
|
|
|
$after=dol_textishtml($input);
|
|
|
- $this->assertTrue($after);
|
|
|
+ $this->assertTrue($after, 'Test with html tag');
|
|
|
$input='<body>xxx</body>';
|
|
|
$after=dol_textishtml($input);
|
|
|
- $this->assertTrue($after);
|
|
|
+ $this->assertTrue($after, 'Test with body tag');
|
|
|
$input='xxx <b>yyy</b> zzz';
|
|
|
$after=dol_textishtml($input);
|
|
|
- $this->assertTrue($after);
|
|
|
+ $this->assertTrue($after, 'Test with b tag');
|
|
|
+ $input='xxx <u>yyy</u> zzz';
|
|
|
+ $after=dol_textishtml($input);
|
|
|
+ $this->assertTrue($after, 'Test with u tag');
|
|
|
$input='text with <div>some div</div>';
|
|
|
$after=dol_textishtml($input);
|
|
|
- $this->assertTrue($after);
|
|
|
+ $this->assertTrue($after, 'Test with div tag');
|
|
|
$input='text with HTML entities';
|
|
|
$after=dol_textishtml($input);
|
|
|
- $this->assertTrue($after);
|
|
|
+ $this->assertTrue($after, 'Test with entities tag');
|
|
|
$input='xxx<br>';
|
|
|
$after=dol_textishtml($input);
|
|
|
- $this->assertTrue($after);
|
|
|
+ $this->assertTrue($after, 'Test with entities br');
|
|
|
$input='xxx<br >';
|
|
|
$after=dol_textishtml($input);
|
|
|
- $this->assertTrue($after);
|
|
|
+ $this->assertTrue($after, 'Test with entities br');
|
|
|
$input='xxx<br style="eee">';
|
|
|
$after=dol_textishtml($input);
|
|
|
- $this->assertTrue($after);
|
|
|
+ $this->assertTrue($after, 'Test with entities br and attributes');
|
|
|
$input='xxx<br style="eee" >';
|
|
|
$after=dol_textishtml($input);
|
|
|
- $this->assertTrue($after);
|
|
|
+ $this->assertTrue($after, 'Test with entities br and attributes bis');
|
|
|
$input='<h2>abc</h2>';
|
|
|
$after=dol_textishtml($input);
|
|
|
- $this->assertTrue($after);
|
|
|
+ $this->assertTrue($after, 'Test with entities h2');
|
|
|
$input='<img id="abc" src="https://xxx.com/aaa/image.png" />';
|
|
|
$after=dol_textishtml($input);
|
|
|
- $this->assertTrue($after,'Failure on test of img tag');
|
|
|
+ $this->assertTrue($after, 'Test with img tag');
|
|
|
$input='<a class="azerty" href="https://xxx.com/aaa/image.png" />';
|
|
|
$after=dol_textishtml($input);
|
|
|
- $this->assertTrue($after,'Failure on test of a tag');
|
|
|
+ $this->assertTrue($after, 'Test with a tag');
|
|
|
|
|
|
// False
|
|
|
$input='xxx < br>';
|