Commit bc621024 authored by Carsten  Rose's avatar Carsten Rose
Browse files

phpunit: Update LDAP Test - surrounding spaces seems to be escaped now by '\20'

parent 454d7fb3
...@@ -347,7 +347,7 @@ class EvaluateTest extends AbstractDatabaseTest { ...@@ -347,7 +347,7 @@ class EvaluateTest extends AbstractDatabaseTest {
// LDAP_ESCAPE_DN => array('\\', ',', '=', '+', '<', '>', ';', '"', '#'), // LDAP_ESCAPE_DN => array('\\', ',', '=', '+', '<', '>', ';', '"', '#'),
$this->store->setVar('a', ' hello world ', STORE_FORM, true); $this->store->setVar('a', ' hello world ', STORE_FORM, true);
// $this->assertEquals('\20hello world\20', $eval->substitute('a:F:all:L', $foundInStore)); // $this->assertEquals('\20hello world\20', $eval->substitute('a:F:all:L', $foundInStore));
$this->assertEquals(' hello world ', $eval->substitute('a:F:all:L', $foundInStore)); $this->assertEquals('\\20hello world\\20', $eval->substitute('a:F:all:L', $foundInStore));
$this->store->setVar('a', 'h\e,l=l+o< >w;o"r#ld', STORE_FORM, true); $this->store->setVar('a', 'h\e,l=l+o< >w;o"r#ld', STORE_FORM, true);
$this->assertEquals('h\5ce\2cl\3dl\2bo\3c \3ew\3bo\22r\23ld', $eval->substitute('a:F:all:L', $foundInStore)); $this->assertEquals('h\5ce\2cl\3dl\2bo\3c \3ew\3bo\22r\23ld', $eval->substitute('a:F:all:L', $foundInStore));
...@@ -355,7 +355,7 @@ class EvaluateTest extends AbstractDatabaseTest { ...@@ -355,7 +355,7 @@ class EvaluateTest extends AbstractDatabaseTest {
$this->store->setVar('a', ' hel;lo world ', STORE_FORM, true); $this->store->setVar('a', ' hel;lo world ', STORE_FORM, true);
// $this->assertEquals('\20hel\3blo world\20', $eval->substitute('a:F:all:sL', $foundInStore)); // $this->assertEquals('\20hel\3blo world\20', $eval->substitute('a:F:all:sL', $foundInStore));
$this->assertEquals(' hel\3blo world ', $eval->substitute('a:F:all:sL', $foundInStore)); $this->assertEquals('\20hel\3blo world\20', $eval->substitute('a:F:all:sL', $foundInStore));
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment