aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorrubencm <rubencm@gmail.com>2019-10-31 20:54:21 +0000
committerrubencm <rubencm@gmail.com>2019-10-31 20:54:21 +0000
commit163aac74dbe500eac223ea2ebdbce0a76c1d6ab4 (patch)
tree928af074d46a82d5d1a3dec5ba9cf5ad506f37fa /tests
parent404768a607a3738bf6545c87eed53eec30204be9 (diff)
downloadforums-163aac74dbe500eac223ea2ebdbce0a76c1d6ab4.tar
forums-163aac74dbe500eac223ea2ebdbce0a76c1d6ab4.tar.gz
forums-163aac74dbe500eac223ea2ebdbce0a76c1d6ab4.tar.bz2
forums-163aac74dbe500eac223ea2ebdbce0a76c1d6ab4.tar.xz
forums-163aac74dbe500eac223ea2ebdbce0a76c1d6ab4.zip
[ticket/16190] Deprecate phpbb's checkdnsrr wrapper
PHPBB3-16190
Diffstat (limited to 'tests')
-rw-r--r--tests/functions/get_remote_file_test.php2
-rw-r--r--tests/network/checkdnsrr_test.php67
-rw-r--r--tests/version/version_fetch_test.php2
3 files changed, 2 insertions, 69 deletions
diff --git a/tests/functions/get_remote_file_test.php b/tests/functions/get_remote_file_test.php
index 75e5a6dc61..b783e3c297 100644
--- a/tests/functions/get_remote_file_test.php
+++ b/tests/functions/get_remote_file_test.php
@@ -24,7 +24,7 @@ class phpbb_functions_get_remote_file extends phpbb_test_case
$hostname = 'version.phpbb.com';
- if (!phpbb_checkdnsrr($hostname, 'A'))
+ if (!checkdnsrr($hostname, 'A'))
{
$this->markTestSkipped(sprintf(
'Could not find a DNS record for hostname %s. ' .
diff --git a/tests/network/checkdnsrr_test.php b/tests/network/checkdnsrr_test.php
deleted file mode 100644
index 8cbd4f7e97..0000000000
--- a/tests/network/checkdnsrr_test.php
+++ /dev/null
@@ -1,67 +0,0 @@
-<?php
-/**
-*
-* This file is part of the phpBB Forum Software package.
-*
-* @copyright (c) phpBB Limited <https://www.phpbb.com>
-* @license GNU General Public License, version 2 (GPL-2.0)
-*
-* For full copyright and license information, please see
-* the docs/CREDITS.txt file.
-*
-*/
-
-/**
-* @group slow
-*/
-class phpbb_network_checkdnsrr_test extends phpbb_test_case
-{
- public function data_provider()
- {
- return array(
- // Existing MX record
- array('phpbb.com', 'MX', true),
-
- // Non-existing MX record
- array('does-not-exist.phpbb.com', 'MX', false),
-
- // Existing A record
- array('www.phpbb.com', 'A', true),
-
- // Non-existing A record
- array('does-not-exist.phpbb.com', 'A', false),
-
- // Existing AAAA record
- array('www.six.heise.de', 'AAAA', true),
-
- // Non-existing AAAA record
- array('does-not-exist.phpbb.com', 'AAAA', false),
-
- // Existing CNAME record
- array('area51.phpbb.com', 'CNAME', true),
-
- // Non-existing CNAME record
- array('does-not-exist.phpbb.com', 'CNAME', false),
-
- // Existing NS record
- array('phpbb.com', 'NS', true),
-
- // Non-existing NS record
- array('does-not-exist', 'NS', false),
-
- // Existing TXT record
- array('phpbb.com', 'TXT', true),
-
- // Non-existing TXT record
- array('does-not-exist', 'TXT', false),
- );
- }
-
- /**
- * @dataProvider data_provider
- */
- public function test_checkdnsrr($host, $type, $expected)
- {
- $this->assertEquals($expected, phpbb_checkdnsrr($host, $type));
- }
-}
diff --git a/tests/version/version_fetch_test.php b/tests/version/version_fetch_test.php
index 188b371c47..4e8e82567a 100644
--- a/tests/version/version_fetch_test.php
+++ b/tests/version/version_fetch_test.php
@@ -42,7 +42,7 @@ class phpbb_version_helper_fetch_test extends phpbb_test_case
global $phpbb_root_path, $phpEx;
include_once($phpbb_root_path . 'includes/functions.' . $phpEx);
- if (!phpbb_checkdnsrr('version.phpbb.com', 'A'))
+ if (!checkdnsrr('version.phpbb.com', 'A'))
{
$this->markTestSkipped(sprintf(
'Could not find a DNS record for hostname %s. ' .