createDefaultDBConnection($pdo); } /** * * @param string $fileList * @return \PHPUnit_Extensions_Database_DataSet_YamlDataSet * @throws \Exception */ public function loadDataSet($fileList) { if (empty($fileList)) { throw new \Exception("No files specified"); } if( !is_array($fileList)){ $fileList = array($fileList); } $datasetList = array(); foreach ($fileList as $file_name) { $file = PHPUNIT_DATASETS_PATH."/$file_name"; if( !is_file($file) ){ throw new \Exception("missing $file"); } $dataSet = new YamlDataSet($file); $datasetList[] = $dataSet; } $compositeDataSet = new CompositeDataSet($datasetList); return $dataSet; } }