You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

32 lines
973 B

<?php
// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
//
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
/**
* @group integration
*/
class TikiLib_UrlEncodeAccentTest extends PHPUnit\Framework\TestCase
{
protected function setUp(): void
{
$this->tikilib = TikiLib::lib('tiki');
}
public function testUrlEncodeAccentShouldNotChangeValidUrlString(): void
{
$str = 'SomeString';
$this->assertEquals($str, $this->tikilib->urlencode_accent($str));
}
public function testUrlEncodeAccentShouldChangeStringWithInvalidCharactersForUrl(): void
{
$str = 'http://tiki.org/Página en español';
$modifedString = 'http://tiki.org/P%C3%A1gina%20en%20espa%C3%B1ol';
$this->assertEquals($modifedString, $this->tikilib->urlencode_accent($str));
}
}