Example #1
0
 /**
  * Allow to pass instances of either Query or ParseQuery.
  *
  * @param string           $key
  * @param Query|ParseQuery $query
  *
  * @return $this
  */
 public function matchesKeyInQuery($key, $queryKey, $query)
 {
     $this->parseQuery->matchesKeyInQuery($key, $queryKey, $this->parseQueryFromQuery($query));
     return $this;
 }
Example #2
-1
 public function testMatchesKeyInQuery()
 {
     $this->provideTestObjectsForKeyInQuery();
     $subQuery = new ParseQuery("Restaurant");
     $subQuery->greaterThan("ratings", 4);
     $query = new ParseQuery("Person");
     $query->matchesKeyInQuery("hometown", "location", $subQuery);
     $results = $query->find();
     $this->assertEquals(1, count($results), 'Did not return correct number of objects.');
     $this->assertEquals("Bob", $results[0]->get("name"), 'Did not return the correct object.');
 }
Example #3
-1
 public function testMatchesKeyInQuery()
 {
     $this->provideTestObjectsForKeyInQuery();
     $subQuery = new ParseQuery('Restaurant');
     $subQuery->greaterThan('ratings', 4);
     $query = new ParseQuery('Person');
     $query->matchesKeyInQuery('hometown', 'location', $subQuery);
     $results = $query->find();
     $this->assertEquals(1, count($results), 'Did not return correct number of objects.');
     $this->assertEquals('Bob', $results[0]->get('name'), 'Did not return the correct object.');
 }