public function testMakingCallIncrementsCallCount() { $mockSession = $this->getMockBuilder('\\Thruway\\Session')->setConstructorArgs([new \Thruway\Transport\DummyTransport()])->getMock(); $this->assertEquals(0, $this->_registration->getCurrentCallCount()); $callMsg = new \Thruway\Message\CallMessage(\Thruway\Session::getUniqueId(), new \stdClass(), 'test_procedure'); $call = new \Thruway\Call($mockSession, $callMsg); $this->_registration->processCall($call); $this->assertEquals(1, $this->_registration->getCurrentCallCount()); }
public function testMakingCallIncrementsCallCount() { $mockSession = new \Thruway\Session(new \Thruway\Transport\DummyTransport()); $this->assertEquals(0, $this->_registration->getCurrentCallCount()); $callMsg = new \Thruway\Message\CallMessage(\Thruway\Common\Utils::getUniqueId(), new \stdClass(), 'test_procedure'); $procedure = $this->getMockBuilder('\\Thruway\\Procedure')->disableOriginalConstructor()->getMock(); $call = new \Thruway\Call($mockSession, $callMsg, $procedure); $this->_registration->processCall($call); $this->assertEquals(1, $this->_registration->getCurrentCallCount()); }