@@ -70,10 +70,12 @@ public function setUp()
70
70
71
71
public function testCheckDependenciesWhenDisableModules ()
72
72
{
73
- $ this ->listMock
74
- ->expects ($ this ->any ())
73
+ $ this ->listMock ->expects ($ this ->any ())
75
74
->method ('getNames ' )
76
75
->will ($ this ->returnValue (['A ' , 'B ' , 'C ' , 'D ' , 'E ' ]));
76
+ $ this ->packageInfoMock ->expects ($ this ->atLeastOnce ())
77
+ ->method ('getNonExistingDependencies ' )
78
+ ->willReturn ([]);
77
79
$ this ->checker = new DependencyChecker ($ this ->listMock , $ this ->loaderMock , $ this ->packageInfoFactoryMock );
78
80
79
81
$ actual = $ this ->checker ->checkDependenciesWhenDisableModules (['B ' , 'D ' ]);
@@ -83,6 +85,9 @@ public function testCheckDependenciesWhenDisableModules()
83
85
84
86
public function testCheckDependenciesWhenDisableModulesWithCurEnabledModules ()
85
87
{
88
+ $ this ->packageInfoMock ->expects ($ this ->atLeastOnce ())
89
+ ->method ('getNonExistingDependencies ' )
90
+ ->willReturn ([]);
86
91
$ this ->checker = new DependencyChecker ($ this ->listMock , $ this ->loaderMock , $ this ->packageInfoFactoryMock );
87
92
88
93
$ actual = $ this ->checker ->checkDependenciesWhenDisableModules (['B ' , 'D ' ], ['C ' , 'D ' , 'E ' ]);
@@ -92,10 +97,12 @@ public function testCheckDependenciesWhenDisableModulesWithCurEnabledModules()
92
97
93
98
public function testCheckDependenciesWhenEnableModules ()
94
99
{
95
- $ this ->listMock
96
- ->expects ($ this ->any ())
100
+ $ this ->listMock ->expects ($ this ->any ())
97
101
->method ('getNames ' )
98
102
->will ($ this ->returnValue (['C ' ]));
103
+ $ this ->packageInfoMock ->expects ($ this ->atLeastOnce ())
104
+ ->method ('getNonExistingDependencies ' )
105
+ ->willReturn ([]);
99
106
$ this ->checker = new DependencyChecker ($ this ->listMock , $ this ->loaderMock , $ this ->packageInfoFactoryMock );
100
107
$ actual = $ this ->checker ->checkDependenciesWhenEnableModules (['B ' , 'D ' ]);
101
108
$ expected = [
@@ -107,6 +114,9 @@ public function testCheckDependenciesWhenEnableModules()
107
114
108
115
public function testCheckDependenciesWhenEnableModulesWithCurEnabledModules ()
109
116
{
117
+ $ this ->packageInfoMock ->expects ($ this ->atLeastOnce ())
118
+ ->method ('getNonExistingDependencies ' )
119
+ ->willReturn ([]);
110
120
$ this ->checker = new DependencyChecker ($ this ->listMock , $ this ->loaderMock , $ this ->packageInfoFactoryMock );
111
121
$ actual = $ this ->checker ->checkDependenciesWhenEnableModules (['B ' , 'D ' ], ['C ' ]);
112
122
$ expected = [
0 commit comments