This commit is contained in:
Andrea Adamczyk
2019-10-10 10:39:25 -04:00
parent 026ca016cd
commit 28f493156c
2 changed files with 24 additions and 0 deletions

View File

@@ -0,0 +1,22 @@
<?php
namespace Tests\unit\workflow\engine\src\ProcessMaker\Util\Helpers;
use Tests\TestCase;
class FixContentDispositionFilenameTest extends TestCase
{
/**
* It tests that the special characters are being replaced
* @test
*/
public function it_should_test_the_special_characters_located_in_a_filename()
{
//The file name send to the function
$fileName = "text\"text ?text/text";
//Calling the fixContentDispositionFilename() function
$res = fixContentDispositionFilename($fileName);
//Assert the special characters where replaced with the correct values
$this->assertEquals('texttext _text_text', $res);
}
}