2016-06-09 19:57:46 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Amp\Test\Loop;
|
|
|
|
|
2017-03-12 11:21:44 +01:00
|
|
|
use Amp\Loop\UvDriver;
|
2016-06-09 19:57:46 +02:00
|
|
|
|
2016-12-29 21:47:06 +01:00
|
|
|
/**
|
|
|
|
* @requires extension uv
|
|
|
|
*/
|
2017-03-12 11:21:44 +01:00
|
|
|
class UvDriverTest extends DriverTest {
|
2017-03-10 22:20:28 +01:00
|
|
|
public function getFactory(): callable {
|
2017-03-10 21:31:57 +01:00
|
|
|
return function () {
|
2017-03-12 11:21:44 +01:00
|
|
|
return new UvDriver;
|
2017-03-10 21:31:57 +01:00
|
|
|
};
|
2016-06-09 19:57:46 +02:00
|
|
|
}
|
2017-03-13 13:56:46 +01:00
|
|
|
|
|
|
|
public function testHandle() {
|
2017-05-07 13:09:59 +02:00
|
|
|
$handle = $this->loop->getHandle();
|
|
|
|
$this->assertTrue(\is_resource($handle) || $handle instanceof \UVLoop);
|
2017-03-13 13:56:46 +01:00
|
|
|
}
|
2017-03-15 08:32:05 +01:00
|
|
|
|
|
|
|
public function testSupported() {
|
|
|
|
$this->assertTrue(UvDriver::isSupported());
|
|
|
|
}
|
2016-06-09 19:57:46 +02:00
|
|
|
}
|