Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: 5a31cad6e7
Fetching contributors…

Cannot retrieve contributors at this time

41 lines (36 sloc) 1.162 kb
<?php
namespace PEAR2\Net\RouterOS;
require_once 'ClientFeaturesTest.php';
class ClientPersistentFeaturesTest extends ClientFeaturesTest
{
protected function setUp()
{
$this->object = new Client(\HOSTNAME, USERNAME, PASSWORD, PORT, true);
}
protected function tearDown()
{
$this->object->close();
unset($this->object);
}
public function testCancellingSeparation()
{
$client = new Client(\HOSTNAME, USERNAME, PASSWORD, PORT, true);
$pingRequest = new Request('/ping', null, 'ping');
$pingRequest->setArgument('address', HOSTNAME);
$this->object->sendAsync($pingRequest);
$client->sendAsync($pingRequest);
$client->loop(2);
$this->object->loop(2);
$this->assertGreaterThan(
0, count($client->extractNewResponses('ping'))
);
$this->assertGreaterThan(
0, count($this->object->extractNewResponses('ping'))
);
unset($client);
$this->object->loop(2);
$this->assertGreaterThan(
0, count($this->object->extractNewResponses('ping'))
);
}
}
Jump to Line
Something went wrong with that request. Please try again.