diff --git a/tests/phpunit/MergePluginTest.php b/tests/phpunit/MergePluginTest.php index 1eb4d5f..427b727 100644 --- a/tests/phpunit/MergePluginTest.php +++ b/tests/phpunit/MergePluginTest.php @@ -103,7 +103,7 @@ public function testSubscribedEvents() */ public function testOneMergeNoConflicts() { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -165,7 +165,7 @@ function ($args) use ($that) { */ public function testMergeWithReplace() { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -201,7 +201,7 @@ function ($args) use ($that) { */ public function testMergeWithIgnore() { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -238,7 +238,7 @@ function ($args) use ($that) { */ public function testMergeWithIgnoreAndReplace() { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -377,7 +377,7 @@ function ($args) use (&$packages) { */ public function testRecursivePathRepositoriesWithSubDirectory() { - $that = $this; + $io = $this->io; $dir = $this->fixtureDir(__FUNCTION__); @@ -532,7 +532,7 @@ function ($args) use (&$packages) { */ public function testOneMergeWithConflicts($fireInit) { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -576,7 +576,7 @@ function ($args) use ($that) { */ public function testMergedRepositories() { - $that = $this; + $io = $this->io; $dir = $this->fixtureDir(__FUNCTION__); @@ -668,7 +668,7 @@ function ($args) use ($that) { */ public function testPrependRepositories() { - $that = $this; + $io = $this->io; $dir = $this->fixtureDir(__FUNCTION__); @@ -766,7 +766,7 @@ function ($args) use ($that) { */ public function testUpdateStabilityFlags($fireInit) { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -815,7 +815,7 @@ function ($args) use ($that, &$expects) { public function testAliases() { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -849,7 +849,7 @@ function ($args) use ($that) { public function testMergedAutoload() { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -935,7 +935,7 @@ function ($args) use ($that) { */ public function testMergeExtra($fireInit) { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -967,7 +967,7 @@ function ($args) use ($that) { */ public function testMergeExtraConflict() { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -1000,7 +1000,7 @@ function ($args) use ($that) { */ public function testMergeExtraConflictReplace() { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -1036,7 +1036,7 @@ function ($args) use ($that) { */ public function testMergeExtraDeep($suffix, $replace) { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__ . $suffix); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -1098,7 +1098,7 @@ public function provideDeepMerge() */ public function testMergeScripts($fireInit) { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -1130,7 +1130,7 @@ function ($args) use ($that) { */ public function testMergeScriptsConflict() { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -1165,7 +1165,7 @@ function ($args) use ($that) { */ public function testMergeScriptsConflictReplace() { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -1350,7 +1350,7 @@ function () use ($repoManager) { */ public function testCorrectMergeOrderOfSpecifiedFilesAndGlobFiles() { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -1379,7 +1379,7 @@ function ($args) use ($that, &$expects) { */ public function testSelfVersion() { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -1422,7 +1422,7 @@ function ($args) use ($that) { */ public function testSelfVersionNoRootVersion($fireInit) { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -1470,7 +1470,7 @@ function ($args) use ($that) { */ public function testMergedStabilityFlagsRespectsMinimumStability() { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -1510,7 +1510,7 @@ function ($args) use ($that, &$expects) { */ public function testMergeDevFalse() { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -1542,7 +1542,7 @@ public function testMissingRequireThrowsException() public function testRequire() { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -1564,7 +1564,7 @@ function ($args) use ($that) { */ public function testVersionConstraintWithRevision($fireInit) { - $that = $this; + $dir = $this->fixtureDir(__FUNCTION__); $root = $this->rootFromJson("{$dir}/composer.json"); @@ -1693,7 +1693,7 @@ protected function fixtureDir($subdir) */ protected function rootFromJson($file) { - $that = $this; + $json = json_decode(file_get_contents($file), true); $data = array_merge(