-
Notifications
You must be signed in to change notification settings - Fork 4
Improve pusher integration #9
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
Conversation
WyriHaximus
commented
Feb 11, 2017
- Move to command bus handler
- Test Handler
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
Scrutinizer Auto-Fixes
# Conflicts: # composer.lock
# Conflicts: # composer.lock
@@ -33,6 +32,6 @@ public function __construct(FetchAndIterateService $fetchAndIterateService) | |||
*/ | |||
public function handle(BroadcastsCommand $command): PromiseInterface | |||
{ | |||
return $this->fetchAndIterateService->handle('broadcasts', 'broadcasts', BroadcastInterface::HYDRATE_CLASS); | |||
return resolve($this->fetchAndIterateService->iterate('broadcasts', 'broadcasts', BroadcastInterface::HYDRATE_CLASS)); |
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.
Line exceeds 120 characters; contains 126 characters
Argument::exact($json) | ||
)->shouldBeCalled()->willReturn($repositoryResource); | ||
$service = $this->prophesize(FetchAndHydrateService::class); | ||
$service->fetch('repos/wyrihaximus/tactician-command-handler-mapper', 'repo', RepositoryInterface::HYDRATE_CLASS)->shouldBeCalled()->willReturn(resolve($repositoryResource)); |
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.
Line exceeds 120 characters; contains 182 characters
|
||
$requestService = new RequestService($client->reveal()); | ||
$service = $this->prophesize(FetchAndHydrateService::class); | ||
$service->fetch('repos/wyrihaximus/tactician-command-handler-mapper', 'repo', RepositoryInterface::HYDRATE_CLASS)->shouldBeCalled()->willReturn(resolve($repositoryResource)); |
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.
Line exceeds 120 characters; contains 182 characters
Argument::type('array') | ||
)->shouldBeCalled()->willReturn(reject( | ||
$service = $this->prophesize(FetchAndHydrateService::class); | ||
$service->fetch('repos/wyrihaximus/tactician-command-handler-mapper', 'repo', RepositoryInterface::HYDRATE_CLASS)->shouldBeCalled()->willReturn(reject( |
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.
Line exceeds 120 characters; contains 159 characters
Argument::exact($json) | ||
)->shouldBeCalled()->willReturn($repositoryResource); | ||
$service = $this->prophesize(FetchAndHydrateService::class); | ||
$service->fetch('repos/wyrihaximus/tactician-command-handler-mapper/key', '', RepositoryKeyInterface::HYDRATE_CLASS)->shouldBeCalled()->willReturn(resolve($repositoryResource)); |
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.
Line exceeds 120 characters; contains 185 characters
) | ||
)); | ||
$service = $this->prophesize(FetchAndHydrateService::class); | ||
$service->fetch('settings/ssh_key/123', 'ssh_key', SSHKeyInterface::HYDRATE_CLASS)->shouldBeCalled()->willReturn(resolve($sshKeyResource)); |
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.
Line exceeds 120 characters; contains 147 characters
|
||
$requestService = new RequestService($client->reveal()); | ||
$service = $this->prophesize(FetchAndHydrateService::class); | ||
$service->fetch('users', 'user', UserInterface::HYDRATE_CLASS)->shouldBeCalled()->willReturn(resolve($userResource)); |
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.
Line exceeds 120 characters; contains 125 characters
@@ -114,7 +112,7 @@ public function testObservableMethods(string $method, string $resourceInterface, | |||
|
|||
$loop = Factory::create(); | |||
$asyncClient = $this->prophesize(AsyncClientInterface::class); | |||
$asyncClient->$method()->shouldBeCalled()->willReturn(Observable::fromArray($resources)); | |||
$asyncClient->$method()->shouldBeCalled()->willReturn(Observable::fromArray($resources, new ImmediateScheduler())); |
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.
Line exceeds 120 characters; contains 123 characters
@@ -129,7 +127,7 @@ public function testRepositories() | |||
|
|||
$loop = Factory::create(); | |||
$asyncClient = $this->prophesize(AsyncClientInterface::class); | |||
$asyncClient->repositories(null)->shouldBeCalled()->willReturn(Observable::fromArray($resources)); | |||
$asyncClient->repositories(null)->shouldBeCalled()->willReturn(Observable::fromArray($resources, new ImmediateScheduler())); |
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.
Line exceeds 120 characters; contains 132 characters
@@ -148,7 +146,7 @@ public function testRepositoriesFilter() | |||
|
|||
$loop = Factory::create(); | |||
$asyncClient = $this->prophesize(AsyncClientInterface::class); | |||
$asyncClient->repositories($func)->shouldBeCalled()->willReturn(Observable::fromArray($resources)); | |||
$asyncClient->repositories($func)->shouldBeCalled()->willReturn(Observable::fromArray($resources, new ImmediateScheduler())); |
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.
Line exceeds 120 characters; contains 133 characters