File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 * @method array getTimers(?string $unitPrefix = null)
2020 *
2121 * @package SystemCtl
22- * @author icanhazstring <blubb0r05+github@gmail.com>
22+ * @author icanhazstring frömer <blubb0r05+github@gmail.com>
2323 */
2424class SystemCtl
2525{
@@ -124,8 +124,6 @@ public function __call($name, $arguments)
124124 throw new UnitTypeNotSupportedException ("Unit {$ unitName } not supported " );
125125 }
126126
127- // Singular differs requested name?
128- // Get a list of units
129127 if ($ isPlural ) {
130128 return $ this ->getUnits (ucfirst ($ unitName ), $ arguments );
131129 }
Original file line number Diff line number Diff line change @@ -87,26 +87,26 @@ public function start(bool $raise = true): bool
8787
8888 public function stop (bool $ raise = true ): bool
8989 {
90- return $ this ->execute (__FUNCTION__ );
90+ return $ this ->execute (__FUNCTION__ , $ raise );
9191 }
9292
9393 public function disable (bool $ raise = true ): bool
9494 {
95- return $ this ->execute (__FUNCTION__ );
95+ return $ this ->execute (__FUNCTION__ , $ raise );
9696 }
9797
9898 public function reload (bool $ raise = true ): bool
9999 {
100- return $ this ->execute (__FUNCTION__ );
100+ return $ this ->execute (__FUNCTION__ , $ raise );
101101 }
102102
103103 public function restart (bool $ raise = true ): bool
104104 {
105- return $ this ->execute (__FUNCTION__ );
105+ return $ this ->execute (__FUNCTION__ , $ raise );
106106 }
107107
108108 public function enable (bool $ raise = true ): bool
109109 {
110- return $ this ->execute (__FUNCTION__ );
110+ return $ this ->execute (__FUNCTION__ , $ raise );
111111 }
112112}
Original file line number Diff line number Diff line change @@ -108,6 +108,12 @@ public function testProcessShouldReturnExitCode()
108108 {
109109 $ systemctl = $ this ->getSystemCtlMock (false );
110110 $ service = $ systemctl ->getService ('AwesomeService ' );
111+
111112 $ this ->assertFalse ($ service ->start (false ));
113+ $ this ->assertFalse ($ service ->stop (false ));
114+ $ this ->assertFalse ($ service ->disable (false ));
115+ $ this ->assertFalse ($ service ->enable (false ));
116+ $ this ->assertFalse ($ service ->restart (false ));
117+ $ this ->assertFalse ($ service ->reload (false ));
112118 }
113119}
You can’t perform that action at this time.
0 commit comments