Sindbad~EG File Manager
<?php
namespace Html2Text;
class SearchReplaceTest extends \PHPUnit_Framework_TestCase
{
public function searchReplaceDataProvider() {
return array(
'Bold' => array(
'html' => 'Hello, "<b>world</b>"!',
'expected' => 'Hello, "WORLD"!',
),
'Strong' => array(
'html' => 'Hello, "<strong>world</strong>"!',
'expected' => 'Hello, "WORLD"!',
),
'Italic' => array(
'html' => 'Hello, "<i>world</i>"!',
'expected' => 'Hello, "_world_"!',
),
'Header' => array(
'html' => '<h1>Hello, world!</h1>',
'expected' => "HELLO, WORLD!\n\n",
),
'Table Header' => array(
'html' => '<th>Hello, World!</th>',
'expected' => "\t\tHELLO, WORLD!\n",
),
'Apostrophe' => array(
'html' => 'L'incubateur',
'expected' => 'L\'incubateur'
),
);
}
/**
* @dataProvider searchReplaceDataProvider
*/
public function testSearchReplace($html, $expected)
{
$html = new Html2Text($html);
$this->assertEquals($expected, $html->getText());
}
}
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists