public function testInsertData()
 {
     $row = array('column1' => 'value3');
     $this->mock->expects($this->once())->method('insert')->with($this->callback(function ($table) {
         return $table->getName() == 'pre_table_suf';
     }, $this->equalTo($row)));
     $table = new Table('table', array(), $this->adapter);
     $table->insert($row)->save();
 }
Exemple #2
0
 /**
  * {@inheritdoc}
  */
 public function insert($table, $data)
 {
     // convert to table object
     if (is_string($table)) {
         $table = new Table($table, array(), $this->getAdapter());
     }
     return $table->insert($data)->save();
 }