1
0
mirror of https://github.com/danog/dns.git synced 2024-12-03 09:57:56 +01:00
dns/test/UdpSocketTest.php

19 lines
422 B
PHP
Raw Normal View History

2017-06-29 12:36:09 +02:00
<?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\DnsException::class);
2017-06-29 12:36:09 +02:00
wait(Dns\Internal\UdpSocket::connect("udp://8.8.8.8"));
}
}