Example #1
0
 public function testDoesNotMatchKeyInQuery()
 {
     $this->provideTestObjectsForKeyInQuery();
     $subQuery = new ParseQuery("Restaurant");
     $subQuery->greaterThanOrEqualTo("ratings", 3);
     $query = new ParseQuery("Person");
     $query->doesNotmatchKeyInQuery("hometown", "location", $subQuery);
     $results = $query->find();
     $this->assertEquals(1, count($results), 'Did not return correct number of objects.');
     $this->assertEquals("Billy", $results[0]->get("name"), 'Did not return the correct object.');
 }
Example #2
0
 public function testDoesNotMatchKeyInQuery()
 {
     $this->provideTestObjectsForKeyInQuery();
     $subQuery = new ParseQuery('Restaurant');
     $subQuery->greaterThanOrEqualTo('ratings', 3);
     $query = new ParseQuery('Person');
     $query->doesNotmatchKeyInQuery('hometown', 'location', $subQuery);
     $results = $query->find();
     $this->assertEquals(1, count($results), 'Did not return correct number of objects.');
     $this->assertEquals('Billy', $results[0]->get('name'), 'Did not return the correct object.');
 }