public function testCompareLTEQ() { $this->assertTrue(Dewey::compare($this->callNumber, "514.123 A998a", "<=")); $this->assertTrue(Dewey::compare($this->callNumber, "520", "<=")); $this->assertTrue(Dewey::compare($this->callNumber, $this->callNumber, "<=")); }
/** * compares instance CallNumber against given call number (string or object) * by $operator * * @param mixed call number to compare against (string or Dewey\CallNumber) * @param string operator to use in comparison * @return boolean whether instance obj compares to given call number by $operator */ public function compare($comp, $operator) { return \Dewey::compare($this, $comp, $operator); }