Пример #1
0
 public function testCompare()
 {
     $this->eq(s::compare('', ''), 0);
     $this->lt(s::compare('aaa', 'aaaa'), 0);
     $this->lt(s::compare('aaa', 'aab'), 0);
     $this->gt(s::compare('bbb', 'aaa'), 0);
     $this->eq(s::compare('aaa', 'aaa'), 0);
 }
Пример #2
0
 public function compare($that)
 {
     return s::compare($this->value, self::unwrap($that));
 }