forked from Wavyzz/dolibarr
FIX Filenames must not contains non ascii char or we will get non ascii
char into the SMTP header. FIX Do not encode subject if it is full ascii (not required)
This commit is contained in:
@@ -679,6 +679,26 @@ class FunctionsLibTest extends PHPUnit\Framework\TestCase
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* testDolAsciiCheck
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function testDolAsciiCheck()
|
||||
{
|
||||
// True
|
||||
$result=ascii_check('azerty');
|
||||
$this->assertTrue($result);
|
||||
|
||||
$result=ascii_check('é');
|
||||
$this->assertFalse($result);
|
||||
|
||||
$file=dirname(__FILE__).'/textutf8.txt';
|
||||
$filecontent=file_get_contents($file);
|
||||
$result=ascii_check($filecontent);
|
||||
$this->assertFalse($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* testDolTrunc
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user