function testCleanData()
{
$helper = new helper_plugin_data();
$this->assertEquals('', $helper->_cleanData(' ', ''));
$this->assertEquals('', $helper->_cleanData('', ''));
$this->assertEquals('', $helper->_cleanData(null, ''));
$this->assertEquals('', $helper->_cleanData(false, ''));
$this->assertEquals('', $helper->_cleanData('', 'dt'));
$this->assertEquals('', $helper->_cleanData('this is not a date', 'dt'));
$this->assertEquals('1234-01-01', $helper->_cleanData('1234-1-1', 'dt'));
$this->assertEquals('1234-01-01', $helper->_cleanData('1234-01-01', 'dt'));
$this->assertEquals('%now%', $helper->_cleanData('%now%', 'dt'));
$this->assertEquals('', $helper->_cleanData('1234-01-011', 'dt'));
$this->assertEquals('http://bla', $helper->_cleanData('bla', 'url'));
$this->assertEquals('http://bla', $helper->_cleanData('http://bla', 'url'));
$this->assertEquals('https://bla', $helper->_cleanData('https://bla', 'url'));
$this->assertEquals('tell://bla', $helper->_cleanData('tell://bla', 'url'));
$this->assertEquals('*****@*****.**', $helper->_cleanData('*****@*****.**', 'mail'));
$this->assertEquals('[email protected] bla', $helper->_cleanData('[email protected] bla', 'mail'));
$this->assertEquals('[email protected] bla word', $helper->_cleanData('[email protected] bla word', 'mail'));
$this->assertEquals('[email protected] bla bla word', $helper->_cleanData('bla [email protected] bla word', 'mail'));
$this->assertEquals('[email protected] bla bla word', $helper->_cleanData(' bla [email protected] bla word ', 'mail'));
$this->assertEquals('123', $helper->_cleanData('123', 'page'));
$this->assertEquals('123_123', $helper->_cleanData('123 123', 'page'));
$this->assertEquals('123', $helper->_cleanData('123', 'nspage'));
$this->assertEquals('test', $helper->_cleanData('test', ''));
$this->assertEquals('test', $helper->_cleanData('test', array('type' => '')));
$this->assertEquals('', $helper->_cleanData('test', array('type' => '', 'enum' => 'some other')));
}