Skip to content
GitLab
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
cd1de1d2
Commit
cd1de1d2
authored
Nov 08, 2019
by
Carsten Rose
Browse files
fix unit tests
parent
72d6b5bc
Pipeline
#2667
passed with stages
in 2 minutes and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/Tests/Unit/Core/Helper/HelperFormElementTest.php
View file @
cd1de1d2
...
...
@@ -201,58 +201,6 @@ class HelperFormElementTest extends TestCase {
$this
->
assertEquals
(
'{"red":18,"green":52,"blue":86}'
,
$result
,
"Expect white"
);
}
public
function
testTextareaAutoHeight
()
{
$result
=
HelperFormElement
::
textareaAutoHeight
([],
''
);
$this
->
assertEquals
(
'1'
,
$result
);
$result
=
HelperFormElement
::
textareaAutoHeight
([
1
],
''
);
$this
->
assertEquals
(
'1'
,
$result
);
$result
=
HelperFormElement
::
textareaAutoHeight
([
1
,
0
],
''
);
$this
->
assertEquals
(
'1'
,
$result
);
$result
=
HelperFormElement
::
textareaAutoHeight
([
1
,
1
],
''
);
$this
->
assertEquals
(
'1'
,
$result
);
$result
=
HelperFormElement
::
textareaAutoHeight
([
1
,
2
],
''
);
$this
->
assertEquals
(
'2'
,
$result
);
$result
=
HelperFormElement
::
textareaAutoHeight
([],
'Expect white\nExpect white Expect white Expect white\nExpect white'
);
$this
->
assertEquals
(
'1'
,
$result
);
$result
=
HelperFormElement
::
textareaAutoHeight
([
20
],
'Expect white\nExpect white Expect white Expect white\nExpect white'
);
$this
->
assertEquals
(
'1'
,
$result
);
$result
=
HelperFormElement
::
textareaAutoHeight
([
20
,
0
],
'Expect white\nExpect white Expect white Expect white\nExpect white'
);
$this
->
assertEquals
(
'1'
,
$result
);
$result
=
HelperFormElement
::
textareaAutoHeight
([
20
,
1
],
'Expect white\nExpect white Expect white Expect white\nExpect white'
);
$this
->
assertEquals
(
'1'
,
$result
);
$result
=
HelperFormElement
::
textareaAutoHeight
([
20
,
2
],
'Expect white\nExpect white Expect white Expect white\nExpect white'
);
$this
->
assertEquals
(
'2'
,
$result
);
$result
=
HelperFormElement
::
textareaAutoHeight
([
1
,
1
,
1
],
''
);
$this
->
assertEquals
(
'1'
,
$result
);
$result
=
HelperFormElement
::
textareaAutoHeight
([
20
,
1
,
10
],
'one line'
);
$this
->
assertEquals
(
'1'
,
$result
);
$result
=
HelperFormElement
::
textareaAutoHeight
([
20
,
1
,
2
],
"Expect white
\n
Expect white
\n
Expect white"
);
$this
->
assertEquals
(
'2'
,
$result
);
$result
=
HelperFormElement
::
textareaAutoHeight
([
20
,
1
,
10
],
"Expect white
\n
Expect white
\n
Expect white"
);
$this
->
assertEquals
(
'3'
,
$result
);
$result
=
HelperFormElement
::
textareaAutoHeight
([
20
,
1
,
10
],
"Expect white
\n
Expect white Expect white Expect white
\n
Expect white"
);
$this
->
assertEquals
(
'4'
,
$result
);
}
/**
* @expectedException \UserFormException
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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