@@ -31,13 +31,17 @@ protected function setUp()
31
31
32
32
public function testLaunchStatus ()
33
33
{
34
+ $ requestArgs = [
35
+ ManagerApp::KEY_STATUS => true
36
+ ];
37
+
34
38
$ this ->response ->expects ($ this ->once ())
35
39
->method ('setBody ' )
36
40
->with (
37
41
$ this ->matches ("Current status:%afoo: 1%abar: 1%abaz: 0 " )
38
42
);
39
43
40
- $ model = new ManagerApp ($ this ->cacheManager , $ this ->response , [] );
44
+ $ model = new ManagerApp ($ this ->cacheManager , $ this ->response , $ requestArgs );
41
45
$ model ->launch ();
42
46
}
43
47
@@ -57,7 +61,7 @@ public function testLaunchEnable()
57
61
$ this ->response ->expects ($ this ->once ())
58
62
->method ('setBody ' )
59
63
->with (
60
- $ this ->matches ("Changed cache status:%abaz: 0 -> 1%aCleaned cache types: baz%a " )
64
+ $ this ->matches ("Changed cache status: \n %abaz: 0 -> 1 \n Cleaned cache types:\n baz " )
61
65
);
62
66
63
67
$ model = new ManagerApp ($ this ->cacheManager , $ this ->response , $ requestArgs );
@@ -79,7 +83,7 @@ public function testLaunchDisable()
79
83
$ this ->response ->expects ($ this ->once ())
80
84
->method ('setBody ' )
81
85
->with (
82
- $ this ->matches ("Changed cache status:%abaz: 1 -> 0%a%a " )
86
+ $ this ->matches ("Changed cache status: \n %abaz: 1 -> 0 \n " )
83
87
);
84
88
85
89
$ model = new ManagerApp ($ this ->cacheManager , $ this ->response , $ requestArgs );
@@ -102,7 +106,7 @@ public function testLaunchFlush()
102
106
$ this ->response ->expects ($ this ->once ())
103
107
->method ('setBody ' )
104
108
->with (
105
- $ this ->matches ("Flushed cache types: foo, bar%a " )
109
+ $ this ->matches ("Flushed cache types: \n foo \n bar " )
106
110
);
107
111
108
112
$ model = new ManagerApp ($ this ->cacheManager , $ this ->response , $ requestArgs );
@@ -125,7 +129,7 @@ public function testLaunchClean()
125
129
$ this ->response ->expects ($ this ->once ())
126
130
->method ('setBody ' )
127
131
->with (
128
- $ this ->matches ("Cleaned cache types: foo, bar%a " )
132
+ $ this ->matches ("Cleaned cache types: \n foo \n bar " )
129
133
);
130
134
131
135
$ model = new ManagerApp ($ this ->cacheManager , $ this ->response , $ requestArgs );
@@ -151,7 +155,7 @@ public function testLaunchSetAndClean()
151
155
$ this ->response ->expects ($ this ->once ())
152
156
->method ('setBody ' )
153
157
->with (
154
- $ this ->matches ("Changed cache status:%afoo: 0 -> 1%aCleaned cache types: foo, bar%a " )
158
+ $ this ->matches ("Changed cache status: \n %afoo: 0 -> 1 \n Cleaned cache types:\n foo \n bar " )
155
159
);
156
160
157
161
$ model = new ManagerApp ($ this ->cacheManager , $ this ->response , $ requestArgs );
@@ -178,7 +182,7 @@ public function testLaunchAll()
178
182
$ this ->response ->expects ($ this ->once ())
179
183
->method ('setBody ' )
180
184
->with (
181
- $ this ->matches ("Changed cache status:%abaz: 0 -> 1%aFlushed cache types: foo, baz%a " )
185
+ $ this ->matches ("Changed cache status: \n %abaz: 0 -> 1%aFlushed cache types: \n foo \n baz " )
182
186
);
183
187
184
188
$ model = new ManagerApp ($ this ->cacheManager , $ this ->response , $ requestArgs );
0 commit comments