net test batch

This commit is contained in:
sc0Vu 2017-12-18 11:50:03 +08:00
parent b7ad62faaf
commit 1cc89bc04c

View File

@ -89,6 +89,28 @@ class NetTest extends TestCase
});
}
/**
* testBatch
*
* @return void
*/
public function testBatch()
{
$net = $this->net;
$net->batch(true);
$net->version();
$net->listening();
$net->provider->execute(function ($err, $data) {
if ($err !== null) {
return $this->fail($err->getMessage());
}
$this->assertTrue(is_string($data[0]->result));
$this->assertTrue(is_bool($data[1]->result));
});
}
/**
* testUnallowedMethod
*