1
0
Fork 0

inject them directly

pull/410/head
till 2012-03-09 13:57:03 +01:00
parent 84bf429795
commit bcadfadc8a
1 changed files with 5 additions and 6 deletions

View File

@ -41,22 +41,22 @@ class SvnDriverTest extends \PHPUnit_Framework_TestCase
array( array(
'http://till:test@svn.example.org/', 'http://till:test@svn.example.org/',
" --no-auth-cache --username 'till' --password 'test' ", " --no-auth-cache --username 'till' --password 'test' ",
'\Composer\IO\NullIO', $nullIO,
), ),
array( array(
'http://svn.apache.org/', 'http://svn.apache.org/',
'', '',
'\Composer\IO\NullIO', $nullIO,
), ),
array( array(
'svn://johndoe@example.org', 'svn://johndoe@example.org',
" --no-auth-cache --username 'johndoe' --password '' ", " --no-auth-cache --username 'johndoe' --password '' ",
'\Composer\IO\NullIO', $nullIO,
), ),
array( array(
'https://till:secret@corp.svn.local/project1', 'https://till:secret@corp.svn.local/project1',
" --username 'till' --password 'secret' ", " --username 'till' --password 'secret' ",
'\Composer\IO\ConsoleIO', $consoleInteractiveIO,
), ),
); );
} }
@ -70,9 +70,8 @@ class SvnDriverTest extends \PHPUnit_Framework_TestCase
* *
* @dataProvider urlProvider * @dataProvider urlProvider
*/ */
public function testCredentials($url, $expect, $ioClass) public function testCredentials($url, $expect, \Composer\IO\IOInterface $io)
{ {
$io = new \Composer\IO\NullIO;
$svn = new SvnDriver($url, $io); $svn = new SvnDriver($url, $io);
$this->assertEquals($expect, $svn->getSvnCredentialString()); $this->assertEquals($expect, $svn->getSvnCredentialString());