File tree Expand file tree Collapse file tree 2 files changed +0
-24
lines changed
Expand file tree Collapse file tree 2 files changed +0
-24
lines changed Original file line number Diff line number Diff line change @@ -40,14 +40,6 @@ public static function setBinary(string $binary): void
4040 self ::$ binary = $ binary ;
4141 }
4242
43- /**
44- * @param bool $flag
45- */
46- public static function sudo (bool $ flag ): void
47- {
48- self ::$ sudo = $ flag ;
49- }
50-
5143 /**
5244 * @param string $unitSuffix
5345 * @param string $unitName
Original file line number Diff line number Diff line change @@ -150,25 +150,9 @@ public function testGetTimers()
150150 $ this ->assertCount (2 , $ timers );
151151 }
152152
153- public function testSetSudoShouldChangeCommand ()
154- {
155- $ systemCtl = new SystemCtl ();
156-
157- $ processBuilder = $ systemCtl ->getProcessBuilder ();
158- $ this ->assertEquals ("'/bin/systemctl' " , $ processBuilder ->getProcess ()->getCommandLine ());
159-
160- SystemCtl::sudo (true );
161- $ processBuilder = $ systemCtl ->getProcessBuilder ();
162- $ this ->assertEquals ("'sudo' '/bin/systemctl' " , $ processBuilder ->getProcess ()->getCommandLine ());
163- }
164-
165- /**
166- * @depends testSetSudoShouldChangeCommand
167- */
168153 public function testSetBinaryShouldChangeCommand ()
169154 {
170155 // Reset sudo to default
171- SystemCtl::sudo (false );
172156 $ systemCtl = new SystemCtl ();
173157
174158 $ processBuilder = $ systemCtl ->getProcessBuilder ();
You can’t perform that action at this time.
0 commit comments