Skip to content

Conversation

WyriHaximus
Copy link
Member

  • Move to command bus handler
  • Test Handler

@@ -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));

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));

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));

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(

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));

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));

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));

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()));

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()));

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()));

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

@WyriHaximus WyriHaximus merged commit c0537bc into master Apr 24, 2017
@WyriHaximus WyriHaximus deleted the improve-pusher branch April 24, 2017 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants