Exemplo n.º 1
0
 public function testGetResourceWithSoqlQuery()
 {
     $ds = new SodaDataset($this->client, $this->id);
     $soql = new SoqlQuery();
     $soql->select("date_posted", "state", "sample_type")->where("state = 'AR'");
     $results = $ds->getDataset($soql);
     $this->assertTrue(count($results) > 1);
 }
 public function testDeleteRow()
 {
     $ds = new SodaDataset($this->client, $this->id);
     $soql = new SoqlQuery();
     $soql->select(":id,date,os,visits");
     $result = $ds->getDataset($soql);
     $uID = $result[0][':id'];
     $ds->deleteRow($uID);
     $soql->select(':id')->where(':id = ' . $uID);
     $new_result = $ds->getDataset($soql);
     $this->assertEmpty($new_result);
 }
Exemplo n.º 3
0
 public function testMultipleSelectsQuery()
 {
     $soql = new SoqlQuery();
     $soql->select("first", "second")->select("third");
     $expected = '$select=third';
     $this->assertContains($expected, (string) $soql);
 }