2018-12-29 21:54:25 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Obviously replies on working DNS service
|
|
|
|
*/
|
2021-03-22 10:28:28 +01:00
|
|
|
class CheckDomainTest extends \PHPUnit\Framework\TestCase
|
|
|
|
{
|
2021-04-13 22:19:16 +02:00
|
|
|
public function testBasic()
|
|
|
|
{
|
2018-12-29 21:54:25 +01:00
|
|
|
$this->assertEquals('', check_domain('example.com'));
|
|
|
|
$this->assertEquals('', check_domain('google.com'));
|
2024-04-22 22:08:57 +02:00
|
|
|
$this->assertMatchesRegularExpression('/ not discoverable in DNS/', check_domain('fishbeansblahblahblah' . uniqid() . '.com'));
|
2018-12-29 21:54:25 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/* vim: set expandtab softtabstop=4 tabstop=4 shiftwidth=4: */
|