Beispiel #1
0
 public function testPush()
 {
     $data = array(mt_rand(), 'Snow', 'Den');
     // Set message.
     $id = $this->object->push($data);
     $this->assertTrue($id > 0);
     $this->assertEquals($data, $this->object->get($id));
 }
 /**
  * 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');
     }
 }