diff options
author | Gunnar Wrobel <wrobel@pardus.de> | 2010-02-21 10:04:49 (GMT) |
---|---|---|
committer | Gunnar Wrobel <wrobel@pardus.de> | 2010-02-21 10:04:49 (GMT) |
commit | 6b0d7f72d5676c1c2a721826b0f6e6199b00cc05 (patch) | |
tree | a7ee46abf331346ea5c6b24a366a622cf90a0e09 /test/KolabAdmin | |
parent | 474486a544b779462ddf17c517569b3ae048f45b (diff) | |
download | kolab-webadmin-6b0d7f72d5676c1c2a721826b0f6e6199b00cc05.tar.gz |
kolab/issue3499 (Kolab web admin does not use LDAP escaping)
Found the actual issue I tried to fix last time which was the broken midair collision check. Now it also makes sense why the function broke with the later fixing I did. Basically countMail() was not aware of any LDAP escaping when counting objects with an excluded DN. Should now be fixed and I added a test for that problem.
Diffstat (limited to 'test/KolabAdmin')
-rw-r--r-- | test/KolabAdmin/Unit/BaseTest.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/KolabAdmin/Unit/BaseTest.php b/test/KolabAdmin/Unit/BaseTest.php index 55e7f9b..f7b6f23 100644 --- a/test/KolabAdmin/Unit/BaseTest.php +++ b/test/KolabAdmin/Unit/BaseTest.php @@ -88,6 +88,19 @@ class KolabAdmin_Unit_BaseTest extends PHPUnit_Framework_TestCase ); } + public function testCountmailReturnsZeroOnExistingMailWithEscapedDnCharactersIfDnExcluded() + { + $this->_add($this->_getTestUser(',=,')); + $this->assertEquals( + 0, + $this->ldap->countMail( + $_SESSION['base_dn'], + 'kolabadmin.test.,=,@' . $_SESSION['fqdnhostname'], + 'cn=' . $this->ldap->dn_escape('KolabAdmin TestUser,=,') . ',' . $_SESSION['base_dn'] + ) + ); + } + public function testAddingObjectIsSuccessful() { $this->_add($this->_getTestUser()); |