Example #1
0
 public function testInsertRow()
 {
     $sql = "SELECT * FROM children";
     $beforeCount = $this->createTableFromQuery($sql)->getRowCount();
     $insertData = array('child_name' => 'child100');
     $id = $this->childrenTable->insertRow($insertData);
     $afterCount = $this->createTableFromQuery($sql)->getRowCount();
     $this->assertEquals($afterCount - $beforeCount, 1);
     $child = $this->childrenTable->getRow($id);
     $this->assertCommonFieldsMatch($child->toArray(), $insertData);
 }