Exemple #1
0
 /**
  * select items with a select statment
  * 
  * @depends testAddMultipleRecords
  */
 function testSelectQuery()
 {
     // sleep for atleast one second between methods, it is only 'eventual consistency'
     sleep(1);
     $query = "select * from {$this->test_domain} where `letter_position` between '07' and '12' ";
     $result = SimpleDB::select($query);
     // assert 6 results came back
     $this->assertArrayCount($result, 6);
     // assert this known result was as expected, if so, assumme the rest are correct also
     $this->assertTrue(array_val($result, array('j', 'letter_position')) == '09');
 }