public function testParseSubItemFiltersInvalidNonFuzzy() { $caught = false; try { EarthIT_Storage_ItemFilters::parseMulti(array('user-organization-attachments.user.username' => 'not:in:Frodo Baggins,Jim Henson'), $orgRc, $this->registry->schema, true); } catch (Exception $e) { $caught = true; } $this->assertTrue($caught, "non-fuzzy parsing of " . "'user-organization-attachments.user.username' filter should have thrown an exception"); }
public static function makeSearch(EarthIT_Schema_ResourceClass $rc, $filters = array(), $orderBy = array(), $skip = 0, $limit = null, array $options = array()) { $schema = isset($options[EarthIT_Storage::SCHEMA]) ? $options[EarthIT_Storage::SCHEMA] : null; $fuzzyMatch = isset($options[EarthIT_Storage::FUZZY_MATCH]) ? $options[EarthIT_Storage::FUZZY_MATCH] : false; $filter = EarthIT_Storage_ItemFilters::parseMulti($filters, $rc, $schema, $fuzzyMatch); $comparator = EarthIT_Storage_FieldwiseComparator::parse($orderBy); return new EarthIT_Storage_Search($rc, $filter, $comparator, $skip, $limit, $options); }