1
0
Fork 0

Cross platform test fixes

pull/413/head
Jordi Boggiano 2012-03-08 18:19:31 +01:00
parent 388fcfe610
commit 3aabb4784c
1 changed files with 12 additions and 3 deletions

View File

@ -25,12 +25,12 @@ class SvnDriverTest extends \PHPUnit_Framework_TestCase
* *
* @return array * @return array
*/ */
public static function urlProvider() public function urlProvider()
{ {
return array( return array(
array('http://till:test@svn.example.org/', " --no-auth-cache --username 'till' --password 'test' "), array('http://till:test@svn.example.org/', $this->getCmd(" --no-auth-cache --username 'till' --password 'test' ")),
array('http://svn.apache.org/', ''), array('http://svn.apache.org/', ''),
array('svn://johndoe@example.org', " --no-auth-cache --username 'johndoe' --password '' "), array('svn://johndoe@example.org', $this->getCmd(" --no-auth-cache --username 'johndoe' --password '' ")),
); );
} }
@ -44,4 +44,13 @@ class SvnDriverTest extends \PHPUnit_Framework_TestCase
$this->assertEquals($expect, $svn->getSvnCredentialString()); $this->assertEquals($expect, $svn->getSvnCredentialString());
} }
private function getCmd($cmd)
{
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
return strtr($cmd, "'", '"');
}
return $cmd;
}
} }