1
0
Fork 0
mirror of https://github.com/composer/composer synced 2025-05-09 00:22:53 +00:00

Vendor dir can be outside the current working directory

This commit is contained in:
Martin Hasoň 2012-03-12 12:12:44 +01:00
parent e82e5c39b5
commit c85ae48e5d
2 changed files with 24 additions and 6 deletions

View file

@ -19,6 +19,21 @@ use Composer\DependencyResolver\Operation\UninstallOperation;
class InstallationManagerTest extends \PHPUnit_Framework_TestCase
{
public function testVendorDirOutsideTheWorkingDir()
{
$manager = new InstallationManager(realpath(getcwd().'/../'));
$this->assertSame('../', $manager->getVendorPath());
}
/**
* @expectedException InvalidArgumentException
*/
public function testVendorDirNotAccessible()
{
$manager = new InstallationManager('/oops');
$this->assertSame('../', $manager->getVendorPath());
}
public function testAddGetInstaller()
{
$installer = $this->createInstallerMock();