Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Commit

Permalink
Test: Fix mocking issue.
Browse files Browse the repository at this point in the history
Apparently, `Mock\Hoa\Socket\Connection\Handler` already exists. We
create a mock with a new name to avoid this conflict.
  • Loading branch information
Hywan committed Feb 14, 2017
1 parent 694d73c commit 42742ab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Test/Unit/Connection/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -340,13 +340,13 @@ public function case_merge_a_server()

$this
->given(
$this->mockGenerator->makeVisible('setConnection')->generate('Hoa\Socket\Connection\Handler'),
$this->mockGenerator->makeVisible('setConnection')->generate('Hoa\Socket\Connection\Handler', 'Mock', 'Handlerz'),
$this->mockGenerator->orphanize('__construct'),
$connectionA = new \Mock\Hoa\Socket\Connection(),
$handlerA = new SUT($connectionA),
$handlerA = new \Mock\Handlerz($connectionA),
$this->mockGenerator->orphanize('__construct'),
$connectionB = new \Mock\Hoa\Socket\Server(),
$handlerB = new SUT($connectionB),
$handlerB = new \Mock\Handlerz($connectionB),

$this->calling($handlerB)->setConnection = function (LUT\Connection $connection) use ($self, &$called, $connectionA) {
$called = true;
Expand Down

0 comments on commit 42742ab

Please sign in to comment.