1
0
Fork 0

non-deep check returns allways false

pull/2329/head
Fabian Grutschus 2013-10-16 10:07:10 +02:00
parent 20854a50b4
commit a6823d2f9b
2 changed files with 17 additions and 0 deletions

View File

@ -160,6 +160,10 @@ class PerforceDriver extends VcsDriver
*/
public static function supports(IOInterface $io, $url, $deep = false)
{
if (false === $deep) {
return false;
}
return Perforce::checkServerExists($url, new ProcessExecutor);
}

View File

@ -131,4 +131,17 @@ class PerforceDriverTest extends \PHPUnit_Framework_TestCase
$result = $driver->hasComposerFile($identifier);
$this->assertTrue($result);
}
/**
* Test that supports() simply return false.
*
* @covers \Composer\Repository\Vcs\PerforceDriver::supports
*
* @return void
*/
public function testSupportsReturnsFalseNoDeepCheck()
{
$this->expectOutputString('');
$this->assertFalse(PerforceDriver::supports($this->io, 'existing.url'));
}
}