Esempio n. 1
0
 public function testOrderDescQuery()
 {
     $soql = new SoqlQuery();
     $soql->order("state", SoqlOrderDirection::DESC)->limit(5);
     $results = $this->dataset->getDataset($soql);
     $loop_iterations = count($results) - 1;
     for ($i = 0; $i < $loop_iterations; $i++) {
         $this->assertGreaterThanOrEqual($results[$i + 1]['state'], $results[$i]['state']);
     }
 }
Esempio n. 2
0
 /**
  * @expectedException allejo\Socrata\Exceptions\SodaException
  */
 public function testMultipleOrderQueryWithApiV1()
 {
     $soql = new SoqlQuery();
     $soql->order("state", SoqlOrderDirection::DESC)->order("date_posted", SoqlOrderDirection::ASC)->limit(5);
     $this->dataset->getDataset($soql);
 }