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

From: Date: Mon, 17 Oct 2016 16:48:10 +0000
Subject: Re: com php-src: Merge branch 'pull-request/1808': ext/standard/tests/network/dns_get_mx.phpt
References: 1  Groups: php.cvs 
Request: Send a blank email to php-cvs+get-95171@lists.php.net to get a copy of this message
On 17.10.2016 at 18:00, Joe Watkins wrote: > Commit: 6806a41e7fca8cce9826305a43578629257765ad > Author: Joe Watkins <krakjoe@php.net> Mon, 17 Oct 2016 16:53:04 +0100 > Parents: 96ed946b2b0301489419d1b0321f9a94e35b3abc > Branches: PHP-7.0 > > Link: Zà|ØÃ > –�DÊ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'); Shouldn't we test against domains that are under our control? > +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 -- Christoph M. Becker

« previous php.cvs (#95171) next »