com php-src: Merge branch 'pull-request/1808': ext/standard/tes ts/network/dns_get_mx.phpt

From: Date: Mon, 17 Oct 2016 16:00:50 +0000
Subject: com php-src: Merge branch 'pull-request/1808': ext/standard/tes ts/network/dns_get_mx.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-95159@lists.php.net to get a copy of this message
Commit: 6806a41e7fca8cce9826305a43578629257765ad Author: Joe Watkins <krakjoe@php.net> Mon, 17 Oct 2016 16:53:04 +0100 Parents: 96ed946b2b0301489419d1b0321f9a94e35b3abc Branches: PHP-7.0 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=6806a41e7fca8cce9826305a43578629257765ad Log: Merge branch 'pull-request/1808' Changed paths: A ext/standard/tests/network/dns_get_mx.phpt Diff: diff --git a/ext/standard/tests/network/dns_get_mx.phpt b/ext/standard/tests/network/dns_get_mx.phpt new file mode 100644 index 0000000..c5bf361 --- /dev/null +++ b/ext/standard/tests/network/dns_get_mx.phpt @@ -0,0 +1,29 @@ +--TEST-- +bool dns_get_mx ( string $hostname , array &$mxhosts [, array &$weight ] ); +--CREDITS-- +marcosptf - <marcosptf@yahoo.com.br> - @phpsp - sao paulo - br +--SKIPIF-- +<?php +if (getenv("SKIP_SLOW_TESTS")) + die("skip slow test"); +if (getenv("SKIP_ONLINE_TESTS")) + die("skip test requiring internet connection"); +if (substr(PHP_OS, 0, 3) == 'WIN') { + die('skip: no Windows support'); +} +?> +--FILE-- +<?php +$domains = array('yahoo.co.jp', 'yahoo.com', 'es.yahoo.com', 'fr.yahoo.com', 'it.yahoo.com'); +foreach ($domains as $domain) { + if (getmxrr($domain, $hosts, $weights)) { + echo "Hosts: " . count($hosts) . ", weights: " . count($weights) . "\n"; + } +} +?> +--EXPECTF-- +Hosts: %i, weights: %i +Hosts: %i, weights: %i +Hosts: %i, weights: %i +Hosts: %i, weights: %i +Hosts: %i, weights: %i

« previous php.cvs (#95159) next »