non-deep check returns allways false
parent
20854a50b4
commit
a6823d2f9b
|
@ -160,6 +160,10 @@ class PerforceDriver extends VcsDriver
|
||||||
*/
|
*/
|
||||||
public static function supports(IOInterface $io, $url, $deep = false)
|
public static function supports(IOInterface $io, $url, $deep = false)
|
||||||
{
|
{
|
||||||
|
if (false === $deep) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return Perforce::checkServerExists($url, new ProcessExecutor);
|
return Perforce::checkServerExists($url, new ProcessExecutor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -131,4 +131,17 @@ class PerforceDriverTest extends \PHPUnit_Framework_TestCase
|
||||||
$result = $driver->hasComposerFile($identifier);
|
$result = $driver->hasComposerFile($identifier);
|
||||||
$this->assertTrue($result);
|
$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'));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue