Skip to content

Commit

Permalink
Fix autoload dump tests
Browse files Browse the repository at this point in the history
Changed:
- Method `testAutoloadDump()` to link packages between eachother

Related: composer/composer#7316
  • Loading branch information
mcaskill committed Dec 18, 2018
1 parent d38f3ca commit 81fdd0d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/ExcludeFilePluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Composer\Composer;
use Composer\Config;
use Composer\Autoload\AutoloadGenerator;
use Composer\Package\Link;
use Composer\Package\Package;
use Composer\Package\RootPackage;
use Composer\Script\ScriptEvents;
Expand Down Expand Up @@ -150,6 +151,11 @@ public function testAutoloadDump()
$plugin->parseAutoloads();

$package = new RootPackage('a', '1.0', '1.0');
$package->setRequires([
new Link('a', 'a/a'),
new Link('a', 'b/b'),
new Link('a', 'c/c'),
]);
$this->composer->setPackage($package);

$packages = [];
Expand All @@ -162,6 +168,8 @@ public function testAutoloadDump()
$b->setAutoload([ 'files' => [ 'test2.php' ] ]);
$c->setAutoload([ 'files' => [ 'test3.php', 'foo/bar/test4.php' ] ]);
$c->setTargetDir('foo/bar');
$c->setRequires([ new Link('c', 'd/d') ]);
$d->setRequires([ new Link('d', 'e/e') ]);

$this->repository->expects($this->any())
->method('getCanonicalPackages')
Expand Down

0 comments on commit 81fdd0d

Please sign in to comment.