@@ -31,13 +31,17 @@ protected function setUp()
3131
3232 public function testLaunchStatus ()
3333 {
34+ $ requestArgs = [
35+ ManagerApp::KEY_STATUS => true
36+ ];
37+
3438 $ this ->response ->expects ($ this ->once ())
3539 ->method ('setBody ' )
3640 ->with (
3741 $ this ->matches ("Current status:%afoo: 1%abar: 1%abaz: 0 " )
3842 );
3943
40- $ model = new ManagerApp ($ this ->cacheManager , $ this ->response , [] );
44+ $ model = new ManagerApp ($ this ->cacheManager , $ this ->response , $ requestArgs );
4145 $ model ->launch ();
4246 }
4347
@@ -57,7 +61,7 @@ public function testLaunchEnable()
5761 $ this ->response ->expects ($ this ->once ())
5862 ->method ('setBody ' )
5963 ->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 " )
6165 );
6266
6367 $ model = new ManagerApp ($ this ->cacheManager , $ this ->response , $ requestArgs );
@@ -79,7 +83,7 @@ public function testLaunchDisable()
7983 $ this ->response ->expects ($ this ->once ())
8084 ->method ('setBody ' )
8185 ->with (
82- $ this ->matches ("Changed cache status:%abaz: 1 -> 0%a%a " )
86+ $ this ->matches ("Changed cache status: \n %abaz: 1 -> 0 \n " )
8387 );
8488
8589 $ model = new ManagerApp ($ this ->cacheManager , $ this ->response , $ requestArgs );
@@ -102,7 +106,7 @@ public function testLaunchFlush()
102106 $ this ->response ->expects ($ this ->once ())
103107 ->method ('setBody ' )
104108 ->with (
105- $ this ->matches ("Flushed cache types: foo, bar%a " )
109+ $ this ->matches ("Flushed cache types: \n foo \n bar " )
106110 );
107111
108112 $ model = new ManagerApp ($ this ->cacheManager , $ this ->response , $ requestArgs );
@@ -125,7 +129,7 @@ public function testLaunchClean()
125129 $ this ->response ->expects ($ this ->once ())
126130 ->method ('setBody ' )
127131 ->with (
128- $ this ->matches ("Cleaned cache types: foo, bar%a " )
132+ $ this ->matches ("Cleaned cache types: \n foo \n bar " )
129133 );
130134
131135 $ model = new ManagerApp ($ this ->cacheManager , $ this ->response , $ requestArgs );
@@ -151,7 +155,7 @@ public function testLaunchSetAndClean()
151155 $ this ->response ->expects ($ this ->once ())
152156 ->method ('setBody ' )
153157 ->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 " )
155159 );
156160
157161 $ model = new ManagerApp ($ this ->cacheManager , $ this ->response , $ requestArgs );
@@ -178,7 +182,7 @@ public function testLaunchAll()
178182 $ this ->response ->expects ($ this ->once ())
179183 ->method ('setBody ' )
180184 ->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 " )
182186 );
183187
184188 $ model = new ManagerApp ($ this ->cacheManager , $ this ->response , $ requestArgs );
0 commit comments