Files
PhpSpreadsheet/tests/PhpSpreadsheetTests/Calculation/Functions/Web/UrlEncodeTest.php
Mark Baker 475874bed3 Initial implementation of the URLENCODE() web function (#2031)
* Initial implementation of the URLENCODE() web function
2021-04-28 17:10:36 +02:00

27 lines
628 B
PHP

<?php
namespace PhpOffice\PhpSpreadsheetTests\Calculation\Functions\Web;
use PhpOffice\PhpSpreadsheet\Calculation\Web\Service;
use PHPUnit\Framework\TestCase;
class UrlEncodeTest extends TestCase
{
/**
* @dataProvider providerURLENCODE
*
* @param string $expectedResult
* @param mixed $text
*/
public function testURLENCODE($expectedResult, $text): void
{
$result = Service::urlEncode($text);
self::assertSame($expectedResult, $result);
}
public function providerURLENCODE(): array
{
return require 'tests/data/Calculation/Web/URLENCODE.php';
}
}