diff --git a/tests/Composer/Test/AllFunctionalTest.php b/tests/Composer/Test/AllFunctionalTest.php index 134bc8061..cbb29a64b 100644 --- a/tests/Composer/Test/AllFunctionalTest.php +++ b/tests/Composer/Test/AllFunctionalTest.php @@ -11,6 +11,18 @@ use Symfony\Component\Finder\Finder; */ class AllFunctionalTest extends \PHPUnit_Framework_TestCase { + protected $oldcwd; + public function setUp() + { + $this->oldcwd = getcwd(); + chdir(__DIR__.'/Fixtures/functional'); + } + + public function tearDown() + { + chdir($this->oldcwd); + } + /** * @dataProvider getTestFiles */ diff --git a/tests/Composer/Test/Fixtures/functional/create-project-shows-full-hash-for-dev-packages.test b/tests/Composer/Test/Fixtures/functional/create-project-shows-full-hash-for-dev-packages.test index d068bd087..0e5188e41 100644 --- a/tests/Composer/Test/Fixtures/functional/create-project-shows-full-hash-for-dev-packages.test +++ b/tests/Composer/Test/Fixtures/functional/create-project-shows-full-hash-for-dev-packages.test @@ -1,4 +1,4 @@ --RUN-- -create-project seld/jsonlint %testDir% dev-master +create-project --repository-url=packages.json -v seld/jsonlint %testDir% dev-master --EXPECT-REGEX-- {^Installing seld/jsonlint \(dev-master [a-f0-9]{40}\)} diff --git a/tests/Composer/Test/Fixtures/functional/packages.json b/tests/Composer/Test/Fixtures/functional/packages.json new file mode 100644 index 000000000..b7ac3d53d --- /dev/null +++ b/tests/Composer/Test/Fixtures/functional/packages.json @@ -0,0 +1,44 @@ +[ + { + "name": "seld/jsonlint", + "description": "JSON Linter", + "keywords": [ + "json", + "parser", + "linter", + "validator" + ], + "homepage": "", + "version": "dev-master", + "version_normalized": "9999999-dev", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jordi Boggiano", + "email": "j.boggiano@seld.be", + "homepage": "http://seld.be", + "role": "Developer" + } + ], + "source": { + "type": "git", + "url": "http://github.com/Seldaek/jsonlint", + "reference": "4451f2066efdc53f3fa954c44a47ead73f6838d2" + }, + "type": "library", + "time": "2012-08-13T07:00:11+00:00", + "autoload": { + "psr-0": { + "Seld\\JsonLint": "src/" + } + }, + "bin": [ + "bin/jsonlint" + ], + "require": { + "php": ">=5.3.0" + } + } +] \ No newline at end of file