From a9195eb05fdc0c3c5c7734410cbeba8c36d499f0 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 18 Sep 2012 18:32:24 +0200 Subject: [PATCH] Add a couple test cases --- tests/Composer/Test/Package/CompletePackageTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/Composer/Test/Package/CompletePackageTest.php b/tests/Composer/Test/Package/CompletePackageTest.php index babcff9b0..f6faf505b 100644 --- a/tests/Composer/Test/Package/CompletePackageTest.php +++ b/tests/Composer/Test/Package/CompletePackageTest.php @@ -85,5 +85,14 @@ class CompletePackageTest extends TestCase $package->setTargetDir('../..'); $this->assertEquals('', $package->getTargetDir()); + + $package->setTargetDir('..'); + $this->assertEquals('', $package->getTargetDir()); + + $package->setTargetDir('/..'); + $this->assertEquals('', $package->getTargetDir()); + + $package->setTargetDir('/foo/..'); + $this->assertEquals('foo/', $package->getTargetDir()); } }