@@ -20,7 +20,7 @@ class DaemonRunCommandTest extends \PHPUnit_Framework_TestCase
2020 */
2121 public function testInvalidArgumentException ()
2222 {
23- new DaemonRunCommand ('name ' , ' description ' , new DaemonFactory (), ' not a callable function ' );
23+ new DaemonRunCommand ('not a callable function ' );
2424 }
2525
2626 /**
@@ -29,7 +29,7 @@ public function testInvalidArgumentException()
2929 */
3030 public function testOptions ()
3131 {
32- $ command = new DaemonRunCommand (' name ' , ' description ' , new DaemonFactory (), function () { });
32+ $ command = new DaemonRunCommand (function () { });
3333
3434 $ definition = $ command ->getDefinition ();
3535
@@ -48,7 +48,7 @@ public function testOptions()
4848 */
4949 public function testInvalidOptions ()
5050 {
51- $ command = new DaemonRunCommand (' name ' , ' description ' , new DaemonFactory (), function () { });
51+ $ command = new DaemonRunCommand (function () { });
5252
5353 $ input = new ArrayInput (['--host ' => '_ ' ]);
5454 $ output = new NullOutput ();
@@ -103,7 +103,7 @@ public function testCreateDefaultDaemon()
103103 ->method ('createDaemon ' )
104104 ->will ($ this ->returnValue ($ mockDaemon ));
105105
106- $ command = new DaemonRunCommand (' name ' , ' description ' , $ mockDaemonFactory , function () { });
106+ $ command = new DaemonRunCommand (function () { }, $ mockDaemonFactory );
107107
108108 $ command ->run ($ input , $ output );
109109 }
@@ -130,7 +130,7 @@ public function testCreateTcpDaemonWithHost()
130130 ->with ($ this ->equalTo ($ kernel ), $ this ->equalTo ($ port ), $ this ->equalTo ($ host ))
131131 ->will ($ this ->returnValue ($ mockDaemon ));
132132
133- $ command = new DaemonRunCommand (' name ' , ' description ' , $ mockDaemonFactory , $ kernel );
133+ $ command = new DaemonRunCommand ($ kernel , $ mockDaemonFactory );
134134
135135 $ command ->run ($ input , $ output );
136136 }
@@ -156,7 +156,7 @@ public function testCreateTcpDaemonWithoutHost()
156156 ->with ($ this ->equalTo ($ kernel ), $ this ->equalTo ($ port ), $ this ->equalTo ('localhost ' ))
157157 ->will ($ this ->returnValue ($ mockDaemon ));
158158
159- $ command = new DaemonRunCommand (' name ' , ' description ' , $ mockDaemonFactory , $ kernel );
159+ $ command = new DaemonRunCommand ($ kernel , $ mockDaemonFactory );
160160
161161 $ command ->run ($ input , $ output );
162162 }
0 commit comments