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
d68140f3
Commit
d68140f3
authored
Dec 21, 2018
by
Carsten Rose
Browse files
phpunit: fix problems.
parent
cde5c7f7
Pipeline
#1219
passed with stage
in 1 minute and 38 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/Source/core/store/FillStoreForm.php
View file @
d68140f3
...
...
@@ -69,7 +69,7 @@ class FillStoreForm {
$this
->
feSpecNative
=
$this
->
loadFormElementsBasedOnSIP
();
$form
=
$this
->
store
->
getVar
(
SIP_FORM
,
STORE_SIP
,
SANITIZE_ALLOW_ALNUMX
);
if
(
!
empty
(
$form
))
{
if
(
!
empty
(
$form
)
&&
!
defined
(
'PHPUNIT_QFQ'
)
)
{
// To make STORE_RECORD available at a very early stage.
$recordId
=
$this
->
store
->
getVar
(
SIP_RECORD_ID
,
STORE_SIP
,
SANITIZE_ALLOW_DIGIT
);
$tableFromFormSql
=
"SELECT tableName, primaryKey FROM Form WHERE name=?"
;
...
...
extension/Source/core/store/Store.php
View file @
d68140f3
...
...
@@ -199,14 +199,18 @@ class Store {
if
(
self
::
$phpUnit
)
{
// if (self::$instance !== null) {
// // fake to have a clean environment for the next test.
// self::unsetStore(STORE_TYPO3);
// self::fillStoreTypo3($bodytext);
//
// self::unsetStore(STORE_CLIENT);
// self::fillStoreClient();
// }
if
(
self
::
$instance
!==
null
&&
$fileConfigIni
!=
''
)
{
if
(
$fileConfigIni
==
'init'
){
$fileConfigIni
=
''
;
}
// fake to have a clean environment for the next test.
self
::
unsetStore
(
STORE_TYPO3
);
self
::
fillStoreTypo3
(
$bodytext
);
self
::
unsetStore
(
STORE_CLIENT
);
self
::
fillStoreClient
();
}
// Testing different config files means initialize completely
if
(
$fileConfigIni
!=
''
)
{
...
...
extension/Tests/unit/core/form/DirtyTest.php
View file @
d68140f3
...
...
@@ -1189,4 +1189,13 @@ class DirtyTest extends AbstractDatabaseTest {
$this
->
sip
->
sipUniqId
(
'badcaffee1234'
);
$_COOKIE
[
SESSION_NAME
]
=
'SessionCookieAlice'
;
}
/**
*
*/
protected
function
tearDown
()
{
parent
::
tearDown
();
self
::
$mysqli
->
real_query
(
"DELETE FROM Form WHERE name='form' AND id!=1000"
);
}
}
extension/Tests/unit/core/store/StoreTest.php
View file @
d68140f3
...
...
@@ -39,7 +39,7 @@ class StoreTest extends TestCase {
$_GET
[
'key04'
]
=
'4567'
;
$_POST
[
'key04'
]
=
'5678'
;
$this
->
store
=
Store
::
getInstance
(
"
\n
; some comment
\n
"
.
TYPO3_FORM
.
"=testformnameDoNotChange
\n
"
,
true
);
$this
->
store
=
Store
::
getInstance
(
"
\n
; some comment
\n
"
.
TYPO3_FORM
.
"=testformnameDoNotChange
\n
"
,
true
,
'init'
);
}
...
...
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