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
typo3
qfq
Commits
0b2bcf96
Commit
0b2bcf96
authored
Feb 17, 2018
by
Carsten Rose
Browse files
Add a check: phpUnit Tests are not prepared ofr Multi DB tests
parent
5b636287
Changes
2
Hide whitespace changes
Inline
Side-by-side
extension/qfq/tests/phpunit/AbstractDatabaseTest.php
View file @
0b2bcf96
...
@@ -84,6 +84,13 @@ abstract class AbstractDatabaseTest extends PHPUnit_Framework_TestCase {
...
@@ -84,6 +84,13 @@ abstract class AbstractDatabaseTest extends PHPUnit_Framework_TestCase {
$this
->
store
->
setVar
(
'DB_1_NAME'
,
$dbName
,
STORE_SYSTEM
);
$this
->
store
->
setVar
(
'DB_1_NAME'
,
$dbName
,
STORE_SYSTEM
);
}
}
$dbIndexData
=
$this
->
store
->
getVar
(
SYSTEM_DB_INDEX_DATA
,
STORE_SYSTEM
);
$dbIndexQfq
=
$this
->
store
->
getVar
(
SYSTEM_DB_INDEX_QFQ
,
STORE_SYSTEM
);
if
(
$dbIndexData
!=
$dbIndexQfq
)
{
throw
new
\
qfq\CodeException
(
'phpUnit Tests are not prepared for MultiDB tests'
);
}
if
(
empty
(
$this
->
dbArray
))
{
if
(
empty
(
$this
->
dbArray
))
{
$this
->
dbArray
[
DB_INDEX_DATA_DEFAULT
]
=
new
qfq\Database
();
$this
->
dbArray
[
DB_INDEX_DATA_DEFAULT
]
=
new
qfq\Database
();
}
}
...
...
extension/qfq/tests/phpunit/BuildFormPlainTest.php
View file @
0b2bcf96
...
@@ -521,6 +521,7 @@ class BuildFormPlainTest extends AbstractDatabaseTest {
...
@@ -521,6 +521,7 @@ class BuildFormPlainTest extends AbstractDatabaseTest {
parent
::
setUp
();
parent
::
setUp
();
// Use always the latest (production) FormEditor: played during QuickFormQuery()
// Use always the latest (production) FormEditor: played during QuickFormQuery()
$this
->
dbArray
[
DB_INDEX_DATA_DEFAULT
]
->
sql
(
"DROP TABLE IF EXISTS `Form`"
);
$this
->
dbArray
[
DB_INDEX_DATA_DEFAULT
]
->
sql
(
"DROP TABLE IF EXISTS `Form`"
);
$this
->
dbArray
[
DB_INDEX_DATA_DEFAULT
]
->
sql
(
"DROP TABLE IF EXISTS `FormElement`"
);
$this
->
dbArray
[
DB_INDEX_DATA_DEFAULT
]
->
sql
(
"DROP TABLE IF EXISTS `FormElement`"
);
...
...
Write
Preview
Supports
Markdown
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