1
0
Fork 0

* trim the testcase: no need to inject nullio

pull/410/head
till 2012-03-09 17:27:06 +01:00
parent 8d80969f26
commit 25e8ecc5ba
1 changed files with 5 additions and 20 deletions

View File

@ -31,32 +31,18 @@ class SvnDriverTest extends \PHPUnit_Framework_TestCase
{
$nullIO = new \Composer\IO\NullIO;
$input = new \Symfony\Component\Console\Input\ArrayInput(array('install'));
$output = new \Symfony\Component\Console\Output\NullOutput;
$helper = new \Symfony\Component\Console\Helper\HelperSet;
$consoleInteractiveIO = new \Composer\IO\ConsoleIO($input, $output, $helper);
return array(
array(
'http://till:test@svn.example.org/',
" --no-auth-cache --username 'till' --password 'test' ",
$nullIO,
),
array(
'http://svn.apache.org/',
'',
$nullIO,
),
array(
'svn://johndoe@example.org',
" --no-auth-cache --username 'johndoe' --password '' ",
$nullIO,
),
array(
'https://till:secret@corp.svn.local/project1',
" --username 'till' --password 'secret' ",
$consoleInteractiveIO,
),
);
}
@ -66,13 +52,12 @@ class SvnDriverTest extends \PHPUnit_Framework_TestCase
*
* @param string $url The SVN url.
* @param string $expect The expectation for the test.
* @param string $ioClass The IO interface.
*
* @dataProvider urlProvider
*/
public function testCredentials($url, $expect, \Composer\IO\IOInterface $io)
public function testCredentials($url, $expect)
{
$svn = new SvnDriver($url, $io);
$svn = new SvnDriver($url, new \Composer\IO\NullIO);
$this->assertEquals($expect, $svn->getSvnCredentialString());
}