Skip to content

Commit

Permalink
fix test to provide error message
Browse files Browse the repository at this point in the history
  • Loading branch information
tidal committed Jul 25, 2017
1 parent 2cfd98b commit cf38ca7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/unit/SessionMonitorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Tidal\WampWatch\Stub\ClientSessionStub;
use PHPUnit_Framework_TestCase;
use stdClass;
use Thruway\Message;

/**
* @author Timo Michna <[email protected]>
Expand Down Expand Up @@ -401,12 +402,13 @@ public function test_get_sessioninfo_fail_emits_event()

$monitor->getSessionInfo(654);

$sessionInfo = new stdClass();
$sessionInfo->session = 654;
$errorMessage = $this->getMockBuilder(Message\ErrorMessage::class)
->disableOriginalConstructor()
->getMock();

$stub->failCall(SessionMonitor::SESSION_INFO_TOPIC, $sessionInfo);
$stub->failCall(SessionMonitor::SESSION_INFO_TOPIC, $errorMessage);

$this->assertSame($sessionInfo, $response);
$this->assertSame($errorMessage, $response);
}

public function test_invalid_sessioninfo_does_not_get_added()
Expand Down

0 comments on commit cf38ca7

Please sign in to comment.