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

22 lines
430 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;
2019-01-25 02:27:47 +01:00
class UdpSocketTest extends SocketTest
{
protected function connect(): Promise
{
2017-06-29 12:36:09 +02:00
return Dns\Internal\UdpSocket::connect("udp://8.8.8.8:53");
}
2019-01-25 02:27:47 +01:00
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"));
}
}