mirror of
https://github.com/PHPOffice/PhpSpreadsheet.git
synced 2026-08-25 19:58:18 +00:00
475874bed3
* Initial implementation of the URLENCODE() web function
27 lines
628 B
PHP
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';
|
|
}
|
|
}
|