AF_* constants are only available with the sockets extension

This commit is contained in:
Matthias Pigulla 2013-03-31 23:02:36 +02:00 committed by Fabien Potencier
parent e94346ed6c
commit 82e550b24c

View File

@ -62,6 +62,10 @@ class IpUtilsTest extends \PHPUnit_Framework_TestCase
*/
public function testAnIpv6WithOptionDisabledIpv6()
{
if (!extension_loaded('sockets')) {
$this->markTestSkipped('Only works when the socket extension is enabled');
}
if (defined('AF_INET6')) {
$this->markTestSkipped('Only works when PHP is compiled with the option "disable-ipv6".');
}