Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
domainepublic
alternc
Commits
492dd25c
Commit
492dd25c
authored
Mar 27, 2014
by
alban
Browse files
[fix] unit tests composite datasets
parent
dfd0080c
Changes
3
Hide whitespace changes
Inline
Side-by-side
phpunit/lib/AlterncTest.php
View file @
492dd25c
...
...
@@ -21,13 +21,21 @@ abstract class AlterncTest extends PHPUnit_Extensions_Database_TestCase
* @return \PHPUnit_Extensions_Database_DataSet_YamlDataSet
* @throws \Exception
*/
public
function
loadDataSet
(
$file
_name
)
public
function
loadDataSet
(
$file
List
)
{
$file
=
PHPUNIT_DATASETS_PATH
.
"/
$file_name
"
;
if
(
!
is_file
(
$file
)
){
throw
new
\
Exception
(
"missing
$file
"
);
if
(
!
is_array
(
$fileList
)){
$fileList
=
array
(
$fileList
);
}
$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
;
}
...
...
phpunit/tests/_datasets/domaines.yml
View file @
492dd25c
domaines
:
-
id
:
1
compte
:
2001
domaine
:
example.tld
gesdns
:
1
gesmx
:
1
noerase
:
0
dns_action
:
OK
dns_result
:
0
zonettl
:
86400
id
:
1
compte
:
2001
domaine
:
example.tld
gesdns
:
1
gesmx
:
1
noerase
:
0
dns_action
:
OK
dns_result
:
0
zonettl
:
86400
phpunit/tests/bureau/class/m_mailTest.php
View file @
492dd25c
...
...
@@ -320,7 +320,6 @@ class m_mailTest extends AlterncTest
public
function
testCreate_alias
()
{
// Test #1580
$this
->
object
->
}
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment