1
0
mirror of https://github.com/danog/dns.git synced 2024-12-02 17:38:05 +01:00
dns/test/UdpSocketTest.php
2019-01-24 19:27:47 -06:00

22 lines
430 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"));
}
}