Esempio n. 1
0
 public function tearDown()
 {
     if ($this->object) {
         $result = $this->object->deleteTable('pdotest');
         $this->assertTrue($result);
     }
     parent::tearDown();
 }
 /**
  * Should be able to push without creating the table first
  */
 public function testImplicitCreateTable()
 {
     $this->object->deleteTable('pdotest');
     // created in setUp
     $data = array(mt_rand(), 'Daniel', 'Berrigan');
     try {
         $id = $this->object->push($data);
         $this->assertTrue($id > 0);
         $this->assertEquals($data, $this->object->get($id));
     } catch (\Exception $ex) {
         $this->fail('Should not throw exception when no table');
     }
 }