public function testReplaceMultiple() { $this->eq(s::replaceMultiple(':one :two', array(':one' => 'a', ':two' => 'b')), 'a b'); $this->eq(s::replaceMultiple(':one :two', array(':one' => ':one :two', ':two' => 'b')), ':one :two b'); $this->eq(s::replaceMultiple('', array('a' => 'b', 'b' => 'c')), ''); $this->eq(s::replaceMultiple('abcdef', array()), 'abcdef'); }
public function replaceMultiple($pairs) { return new self(s::replaceMultiple($this->value, XArray::unwrap($pairs))); }