public function getTable($tableName)
{
if (!in_array($tableName, $this->getTableNames())) {
throw new InvalidArgumentException("{$tableName} is not a table in the current database.");
}
if (empty($this->tables[$tableName])) {
$this->tables[$tableName] = new PHPUnit_Extensions_Database_DB_Table($this->getTableMetaData($tableName), $this->databaseConnection);
}
return $this->tables[$tableName];
}