getTable(); if($table !== null) { $tableName = $table->info('name'); } else { #require_once "Zend/Test/PHPUnit/Db/Exception.php"; throw new Zend_Test_PHPUnit_Db_Exception( 'No table name was given to Rowset Table and table name cannot be infered from the table, '. 'because the rowset is disconnected from database.' ); } } $this->data = $rowset->toArray(); $columns = array(); if(isset($this->data[0]) > 0) { $columns = array_keys($this->data[0]); } else if($rowset->getTable() != null) { $columns = $rowset->getTable()->info('cols'); } $this->tableName = $tableName; $this->tableMetaData = new PHPUnit_Extensions_Database_DataSet_DefaultTableMetaData($this->tableName, $columns); } }