From 82e550b24cb5d9659dcff8d1132445a4ede4a365 Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Sun, 31 Mar 2013 23:02:36 +0200 Subject: [PATCH] AF_* constants are only available with the sockets extension --- src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php b/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php index 5b94bd2bd0..3aef49eb04 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/IpUtilsTest.php @@ -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".'); }