public function umlautString() { $str = new String('Hällo'); $this->assertEquals(new \lang\types\Bytes("Hällo"), $str->getBytes('utf-8')); $this->assertEquals(5, $str->length()); }
public function queryTreeWithDefaultEncoding() { $value = new String('value öäü', 'utf-8'); $xpath = new XPath($s = sprintf('<document><node>%s</node></document>', $value->getBytes('utf-8'))); $this->assertEquals($value, new String($xpath->query('string(/document/node)'), 'utf-8')); }