PHP Class PHPUnit_Extensions_Database_DataSet_Specs_Csv, qcodo

The format of the spec string is as follows: |table1:filename.csv,table2:filename2.csv The first portion of the spec including the pipe symbol '|' is optional. If the pipe option is included than it may be preceded by up to four characters specifying values for the following arguments in order: delimiter (defaults to ',',) enclosure (defaults to '"',) escape (defaults to '"',). Any additional characters in the csv options will be discarded.
Author: Mike Lively ([email protected])
Inheritance: implements PHPUnit_Extensions_Database_DataSet_ISpec
Show file Open project: qcodo/qcodo

Public Methods

Method Description
getDataSet ( string $dataSetSpec ) : PHPUnit_Extensions_Database_DataSet_CsvDataSet Creates CSV Data Set from a data set spec.

Protected Methods

Method Description
getCsvOptions ( string $dataSetSpec ) : array Returns CSV options.
getTableFileMap ( string $dataSetSpec ) : array Returns map of tables to files.

Method Details

getCsvOptions() protected method

Returns an array containing the options that will be passed to the PHPUnit_Extensions_Database_DataSet_CsvDataSet constructor. The options are determined by the given $dataSetSpec.
protected getCsvOptions ( string $dataSetSpec ) : array
$dataSetSpec string
return array

getDataSet() public method

Creates CSV Data Set from a data set spec.
public getDataSet ( string $dataSetSpec ) : PHPUnit_Extensions_Database_DataSet_CsvDataSet
$dataSetSpec string
return PHPUnit_Extensions_Database_DataSet_CsvDataSet

getTableFileMap() protected method

Returns an associative array containing a mapping of tables (the key) to files (the values.) The tables and files are determined by the given $dataSetSpec
protected getTableFileMap ( string $dataSetSpec ) : array
$dataSetSpec string
return array