1
0
mirror of https://github.com/danog/dns.git synced 2024-11-26 20:14:51 +01:00
dns/test/UdpSocketTest.php

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