1
0
mirror of https://github.com/danog/dns.git synced 2024-11-30 04:29:06 +01:00
dns/test/UdpSocketTest.php
2017-06-29 12:36:09 +02:00

19 lines
429 B
PHP

<?php
namespace Amp\Dns\Test;
use Amp\Dns;
use Amp\Promise;
use function Amp\Promise\wait;
class UdpSocketTest extends SocketTest {
protected function connect(): Promise {
return Dns\Internal\UdpSocket::connect("udp://8.8.8.8:53");
}
public function testInvalidUri() {
$this->expectException(Dns\ResolutionException::class);
wait(Dns\Internal\UdpSocket::connect("udp://8.8.8.8"));
}
}