[fix] unit tests composite datasets
This commit is contained in:
parent
dfd0080c2c
commit
492dd25c5a
|
@ -21,13 +21,21 @@ abstract class AlterncTest extends PHPUnit_Extensions_Database_TestCase
|
||||||
* @return \PHPUnit_Extensions_Database_DataSet_YamlDataSet
|
* @return \PHPUnit_Extensions_Database_DataSet_YamlDataSet
|
||||||
* @throws \Exception
|
* @throws \Exception
|
||||||
*/
|
*/
|
||||||
public function loadDataSet($file_name)
|
public function loadDataSet($fileList)
|
||||||
{
|
{
|
||||||
$file = PHPUNIT_DATASETS_PATH."/$file_name";
|
if( !is_array($fileList)){
|
||||||
if( !is_file($file) ){
|
$fileList = array($fileList);
|
||||||
throw new \Exception("missing $file");
|
|
||||||
}
|
}
|
||||||
$dataSet = new PHPUnit_Extensions_Database_DataSet_YamlDataSet($file);
|
$datasetList = array();
|
||||||
|
foreach ($fileList as $file_name) {
|
||||||
|
$file = PHPUNIT_DATASETS_PATH."/$file_name";
|
||||||
|
if( !is_file($file) ){
|
||||||
|
throw new \Exception("missing $file");
|
||||||
|
}
|
||||||
|
$dataSet = new PHPUnit_Extensions_Database_DataSet_YamlDataSet($file);
|
||||||
|
$datasetList[] = $dataSet;
|
||||||
|
}
|
||||||
|
$compositeDataSet = new PHPUnit_Extensions_Database_DataSet_CompositeDataSet($datasetList);
|
||||||
return $dataSet;
|
return $dataSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
domaines:
|
domaines:
|
||||||
-
|
-
|
||||||
id : 1
|
id : 1
|
||||||
compte : 2001
|
compte : 2001
|
||||||
domaine : example.tld
|
domaine : example.tld
|
||||||
gesdns : 1
|
gesdns : 1
|
||||||
gesmx : 1
|
gesmx : 1
|
||||||
noerase : 0
|
noerase : 0
|
||||||
dns_action : OK
|
dns_action : OK
|
||||||
dns_result : 0
|
dns_result : 0
|
||||||
zonettl : 86400
|
zonettl : 86400
|
||||||
|
|
|
@ -320,7 +320,6 @@ class m_mailTest extends AlterncTest
|
||||||
public function testCreate_alias()
|
public function testCreate_alias()
|
||||||
{
|
{
|
||||||
// Test #1580
|
// Test #1580
|
||||||
$this->object->
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue