-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
21 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
* @package SystemCtl\Template | ||
* @author icanhazstring <[email protected]> | ||
*/ | ||
class ServiceUnitTemplate extends AbstractUnitTemplate | ||
class ServiceUnitTemplate extends AbstractUnitTemplate implements UnitTemplateInterface | ||
{ | ||
/** @var ServiceSection */ | ||
protected $serviceSection; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ | |
* @package SystemCtl\Template | ||
* @author icanhazstring <[email protected]> | ||
*/ | ||
class TimerUnitTemplate extends AbstractUnitTemplate | ||
class TimerUnitTemplate extends AbstractUnitTemplate implements UnitTemplateInterface | ||
{ | ||
/** @var TimerSection */ | ||
protected $timerSection; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -95,6 +95,7 @@ public function testListUnitsWithAvailableUnits(): void | |
console-setup.service loaded active exited | ||
cron.service loaded active running | ||
test.service loaded inactive dead | ||
● [email protected] loaded failed failed | ||
EOT; | ||
|
||
$command = $this->prophesize(CommandInterface::class); | ||
|
@@ -107,7 +108,7 @@ public function testListUnitsWithAvailableUnits(): void | |
$systemctl->setCommandDispatcher($dispatcherStub->reveal()); | ||
|
||
$units = $systemctl->listUnits(null, SystemCtl::AVAILABLE_UNITS); | ||
self::assertCount(12, $units); | ||
self::assertCount(13, $units); | ||
} | ||
|
||
public function testListUnitsWithSupportedUnits(): void | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,21 +37,22 @@ public function itDeterminesTheCorrectAmountOfUnits( | |
public function itDeterminesTheCorrectAmountOfUnitsDataProvider(): array | ||
{ | ||
$output = <<<OUTPUT | ||
superservice.service Active running | ||
awesomeservice.service Active running | ||
nonservice.timer Active running | ||
superservice.mount Active running | ||
awesomeservice.mount Active running | ||
nonservice.timer Active running | ||
superservice.service Active running | ||
awesomeservice.service Active running | ||
superservice.service active running | ||
awesomeservice.service active running | ||
nonservice.timer active running | ||
superservice.mount active running | ||
awesomeservice.mount active running | ||
nonservice.timer active running | ||
superservice.service active running | ||
awesomeservice.service active running | ||
● [email protected] loaded failed failed | ||
OUTPUT; | ||
|
||
return [ | ||
[ | ||
'output' => $output, | ||
'suffix' => 'service', | ||
'amount' => 4, | ||
'amount' => 5, | ||
], | ||
[ | ||
'output' => $output, | ||
|
@@ -99,6 +100,7 @@ public function itOnlyExtractsTheUnitNamesDataProvider(): array | |
nonservice.timer Active running | ||
[email protected] Active running | ||
[email protected] Active running | ||
● [email protected] loaded failed failed | ||
OUTPUT; | ||
|
||
return [ | ||
|
@@ -110,6 +112,7 @@ public function itOnlyExtractsTheUnitNamesDataProvider(): array | |
'foo-bar', | ||
'instance-service@1', | ||
'instance-service@foo', | ||
'failed-service@foo' | ||
], | ||
], | ||
[ | ||
|