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