public function testApiGetLocalPort_ReturnsPort() { $socket = $this->createSocketListenerMock($this->tempSocketRemoteAddress()); $pattern = '#^([0-9]*?)$#si'; $this->assertRegExp($pattern, $socket->getLocalPort()); }