cvs: pear /Net_LDAP/tests/PHPUnit Net_LDAP.php

From: Date: Wed, 01 Mar 2006 14:21:55 +0000
Subject: cvs: pear /Net_LDAP/tests/PHPUnit Net_LDAP.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-38786@lists.php.net to get a copy of this message
jw Wed Mar 1 14:21:55 2006 UTC Modified files: /pear/Net_LDAP/tests/PHPUnit Net_LDAP.php Log: fix utf8 strings http://cvs.php.net/viewcvs.cgi/pear/Net_LDAP/tests/PHPUnit/Net_LDAP.php?r1=1.8&r2=1.9&diff_format=u Index: pear/Net_LDAP/tests/PHPUnit/Net_LDAP.php diff -u pear/Net_LDAP/tests/PHPUnit/Net_LDAP.php:1.8 pear/Net_LDAP/tests/PHPUnit/Net_LDAP.php:1.9 --- pear/Net_LDAP/tests/PHPUnit/Net_LDAP.php:1.8 Wed Mar 1 03:31:31 2006 +++ pear/Net_LDAP/tests/PHPUnit/Net_LDAP.php Wed Mar 1 14:21:55 2006 @@ -106,7 +106,7 @@ function testUTF8() { - $array1 = array('street' => 'B�ensteiner Str. 30'); + $array1 = array('street' => 'Bärensteiner Str. 30'); $test = $this->ldap->utf8Encode($array1); $this->assertEquals(utf8_encode($array1['street']), $test['street'], 'Encoding an attribute that should be encoded, was not.'); @@ -115,12 +115,12 @@ $this->assertEquals($array1['street'], $test['street'], 'An attribute that should have been decoded, was not'); - $array2 = array('rfc822Mailbox' => 'kr�er'); + $array2 = array('rfc822Mailbox' => 'krämer'); $test = $this->ldap->utf8Encode($array2); $this->assertEquals($array2['rfc822Mailbox'], $test['rfc822Mailbox'], 'An attribute that should not be encoded, was encoded'); - $test = $this->ldap->utf8Decode(array('rfc822Mailbox' => utf8_encode('kr�er'))); + $test = $this->ldap->utf8Decode(array('rfc822Mailbox' => utf8_encode('krämer'))); $this->assertFalse($array2['rfc822Mailbox'] == $test['rfc822Mailbox'], 'An attribute that should not be decoded, was decoded'); @@ -202,6 +202,7 @@ return false; } $newdn = new Net_LDAP_Entry($GLOBALS['rename_dn']); + if (Net_LDAP::isError($msg = $newdn->add($entry->getValues()))) { $this->fail($msg->getMessage()); return false;

« previous php.pear.cvs (#38786) next »