1
0
mirror of https://github.com/danog/dns.git synced 2025-01-22 13:31:12 +01:00
dns/test/UdpSocketTest.php
Aaron Piotrowski d26f9bb44f Remove amphp/file and amphp/uri dependencies (#80)
Replaces async loading of hosts and resolver files with blocking reads by default.

Closes #78.
2019-01-04 18:20:52 +01:00

19 lines
422 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\DnsException::class);
wait(Dns\Internal\UdpSocket::connect("udp://8.8.8.8"));
}
}