Fixed: Not selecting a datalabel used to issue a notice(undefined offset)
[phpmyadmin/ammaryasirr.git] / test / libraries / core / PMA_securePath_test.php
blob3b8575c1d237daf0c9e16e90cb86d4975bb3f3c7
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Tests for PMA_securePath() from libraries/core.lib.php
5 * PMA_securePath changes .. to .
7 * @package phpMyAdmin-test
8 */
10 require_once 'libraries/core.lib.php';
12 class PMA_securePath extends PHPUnit_Framework_TestCase
14 public function testReplaceDots(){
15 $this->assertEquals(PMA_securePath('../../../etc/passwd'), './././etc/passwd');
16 $this->assertEquals(PMA_securePath('/var/www/../phpmyadmin'), '/var/www/./phpmyadmin');
17 $this->assertEquals(PMA_securePath('./path/with..dots/../../file..php'), './path/with.dots/././file.php');