@@ -11,7 +11,13 @@ class DependencyCheckerTest extends \PHPUnit_Framework_TestCase
11
11
{
12
12
public function testCheckDependencies ()
13
13
{
14
- $ composerApp = $ this ->getMock ('Composer\Console\Application ' , [], [], '' , false );
14
+ $ composerApp = $ this ->getMock (
15
+ 'Composer\Console\Application ' ,
16
+ ['setAutoExit ' , 'run ' , 'resetComposer ' ],
17
+ [],
18
+ '' ,
19
+ false
20
+ );
15
21
$ directoryList = $ this ->getMock ('Magento\Framework\App\Filesystem\DirectoryList ' , [], [], '' , false );
16
22
$ directoryList ->expects ($ this ->exactly (2 ))->method ('getRoot ' );
17
23
$ composerApp ->expects ($ this ->once ())->method ('setAutoExit ' )->with (false );
@@ -45,7 +51,13 @@ function ($input, $buffer) {
45
51
46
52
public function testCheckDependenciesExcludeSelf ()
47
53
{
48
- $ composerApp = $ this ->getMock ('Composer\Console\Application ' , [], [], '' , false );
54
+ $ composerApp = $ this ->getMock (
55
+ 'Composer\Console\Application ' ,
56
+ ['setAutoExit ' , 'run ' , 'resetComposer ' ],
57
+ [],
58
+ '' ,
59
+ false
60
+ );
49
61
$ directoryList = $ this ->getMock ('Magento\Framework\App\Filesystem\DirectoryList ' , [], [], '' , false );
50
62
$ directoryList ->expects ($ this ->exactly (3 ))->method ('getRoot ' );
51
63
$ composerApp ->expects ($ this ->once ())->method ('setAutoExit ' )->with (false );
@@ -70,6 +82,7 @@ function ($input, $buffer) {
70
82
$ buffer ->writeln ($ output );
71
83
}
72
84
);
85
+ $ composerApp ->expects ($ this ->atLeastOnce ())->method ('resetComposer ' );
73
86
74
87
$ dependencyChecker = new DependencyChecker ($ composerApp , $ directoryList );
75
88
$ expected = [
0 commit comments