예제 #1
0
 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');
 }
예제 #2
0
 public function replaceMultiple($pairs)
 {
     return new self(s::replaceMultiple($this->value, XArray::unwrap($pairs)));
 }