-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Unit socket #27
Add Unit socket #27
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @peter279k. Thank you for the PR.
Some minor adjustments left, then its fine 👍
Please update the following tests and add the "socket" type to it
https://github.com/icanhazstring/systemctl-php/blob/3ee53d9cc969b5ccdf4487edb845691343c3df62/tests/Unit/Utils/OutputFetcherTest.php
Also update the README.md
please for the Supported Units and add socket
to the list.
tests/Integration/Unit/UnitTest.php
Outdated
$commandDispatcher = $this->createCommandDispatcherStub(); | ||
$commandDispatcher->dispatch(Argument::cetera())->willReturn($command); | ||
|
||
$timer = new Socket('AwesomeService', $commandDispatcher->reveal()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rename as $socket
tests/Integration/Unit/UnitTest.php
Outdated
$commandDispatcher = $this->createCommandDispatcherStub(); | ||
$commandDispatcher->dispatch(Argument::cetera())->willThrow(CommandFailedException::class); | ||
|
||
$timer = new Socket('AwesomeSocket', $commandDispatcher->reveal()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rename as $socket
as well
src/Unit/Socket.php
Outdated
namespace SystemCtl\Unit; | ||
|
||
/** | ||
* Class Timer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class Socket
please
@icanhazstring, thank you for your request changes. And I also appreciate your review. I've accepted request changes that you mention in the latest commit. Please check that. If having any request changes, feel free to write related comments on that line! Thanks :-). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a small typo and string value change.
Thanks for the adjustments!
tests/Integration/Unit/UnitTest.php
Outdated
$commandDispatcher = $this->createCommandDispatcherStub(); | ||
$commandDispatcher->dispatch(Argument::cetera())->willReturn($command); | ||
|
||
$socket = new Socket('AwesomeService', $commandDispatcher->reveal()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you name it AwesomeSocket
please?
tests/Unit/SystemCtlTest.php
Outdated
/** | ||
* @test | ||
*/ | ||
public function itShouldThrowAnExeceptionIfNotSocketCouldBeFound() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a minor typo here
...ExceptionIfNoSocketCouldBeFound
@icanhazstring, thank you for your comment about request changes. Now I've already accepted latest request changes and push the latest commit. Thanks. |
Hi @peter279k thanks for the changes. Merged! :) |
Changed log