Skip to content
Extraits de code Groupes Projets
Valider 704507d5 rédigé par Fabian Becker's avatar Fabian Becker
Parcourir les fichiers

Latest update on Travis-CI changed the way /etc/hosts looks and made

the test for core/IP.php fail. (getHostByAddress always returns the
first alias from /etc/hosts).
parent 1f25ab12
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -686,12 +686,12 @@ class IPTest extends PHPUnit_Framework_TestCase
*/
public function testGetHostByAddr()
{
$hosts = array( 'localhost', strtolower(@php_uname('n')), '127.0.0.1' );
$hosts = array( 'localhost', 'localhost.localdomain', strtolower(@php_uname('n')), '127.0.0.1' );
$this->assertTrue( in_array(strtolower(Piwik_IP::getHostByAddr('127.0.0.1')), $hosts), '127.0.0.1 -> localhost' );
if (!Piwik_Common::isWindows() || PHP_VERSION >= '5.3')
{
$hosts = array( 'ip6-localhost', 'localhost', strtolower(@php_uname('n')), '::1' );
$hosts = array( 'ip6-localhost', 'localhost', 'localhost.localdomain', strtolower(@php_uname('n')), '::1' );
$this->assertTrue( in_array(strtolower(Piwik_IP::getHostByAddr('::1')), $hosts), '::1 -> ip6-localhost' );
}
}
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter