Esempio n. 1
0
 public function testResetAfterAddingData()
 {
     $adapterStub = $this->getMock('\\Phinx\\Db\\Adapter\\MysqlAdapter', array(), array(array()));
     $table = new \Phinx\Db\Table('ntable', array(), $adapterStub);
     $columns = array("column1");
     $data = array(array("value1"));
     $table->insert($columns, $data)->save();
     $this->assertEquals(array(), $table->getData());
 }
Esempio n. 2
0
 public function testResetAfterAddingData()
 {
     $adapterStub = $this->getMock('\\Phinx\\Db\\Adapter\\MysqlAdapter', [], [[]]);
     $table = new \Phinx\Db\Table('ntable', [], $adapterStub);
     $columns = ["column1"];
     $data = [["value1"]];
     $table->insert($columns, $data)->save();
     $this->assertEquals([], $table->getData());
 }