Skip to content

Commit 00dcd2e

Browse files
author
Andreas Frömer
committed
Drop sudo support
1 parent dea2965 commit 00dcd2e

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

src/SystemCtl.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff 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

tests/SystemCtlTest.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)