Fix dol_buildpath with parameter 3. Add phpunit tests

This commit is contained in:
Laurent Destailleur
2016-10-31 10:37:58 +01:00
parent 090f13afa4
commit 3882fa0c3d
2 changed files with 43 additions and 3 deletions

View File

@@ -119,6 +119,32 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
}
/**
* testDolBuildPath
*
* @return boolean
*/
public function testDolBuildPath()
{
/*$tmp=dol_buildpath('/google/oauth2callback.php', 0);
var_dump($tmp);
*/
/*$tmp=dol_buildpath('/google/oauth2callback.php', 1);
var_dump($tmp);
*/
$result=dol_buildpath('/google/oauth2callback.php', 2);
print __METHOD__." result=".$result."\n";
$this->assertStringStartsWith('http', $result);
$result=dol_buildpath('/google/oauth2callback.php', 3);
print __METHOD__." result=".$result."\n";
$this->assertStringStartsWith('http', $result);
}
/**
* testGetBrowserInfo
*
@@ -973,5 +999,5 @@ class FunctionsLibTest extends PHPUnit_Framework_TestCase
return true;
}
}