From 4707b0c18e314e3a2a4d58f942d77ff849fb4d3f Mon Sep 17 00:00:00 2001 From: Andreas Fischer Date: Fri, 14 May 2010 03:57:17 +0200 Subject: [PATCH] [ticket/9599] Adding tests for phpbb_checkdnsrr(). Tests for existing and non-existing records of the types: MX, A, AAAA, NS, CNAME, TXT PHPBB3-9599 --- tests/network/all_tests.php | 4 +++ tests/network/checkdnsrr.php | 63 ++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) create mode 100644 tests/network/checkdnsrr.php diff --git a/tests/network/all_tests.php b/tests/network/all_tests.php index 07a7e57d48..b500647f81 100644 --- a/tests/network/all_tests.php +++ b/tests/network/all_tests.php @@ -15,6 +15,8 @@ if (!defined('PHPUnit_MAIN_METHOD')) require_once 'test_framework/framework.php'; require_once 'PHPUnit/TextUI/TestRunner.php'; +require_once 'network/checkdnsrr.php'; + class phpbb_network_all_tests { public static function main() @@ -26,6 +28,8 @@ class phpbb_network_all_tests { $suite = new PHPUnit_Framework_TestSuite('phpBB Network Functions'); + $suite->addTestSuite('phpbb_network_checkdnsrr_test'); + return $suite; } } diff --git a/tests/network/checkdnsrr.php b/tests/network/checkdnsrr.php new file mode 100644 index 0000000000..57fe2761cc --- /dev/null +++ b/tests/network/checkdnsrr.php @@ -0,0 +1,63 @@ +assertEquals($expected, phpbb_checkdnsrr($host, $type)); + } +}