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
8e49b671
Commit
8e49b671
authored
Feb 19, 2019
by
Carsten Rose
Browse files
Fix unit test
parent
744778d3
Pipeline
#1524
passed with stage
in 2 minutes and 2 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
extension/Tests/unit/core/helper/OnStringTest.php
View file @
8e49b671
...
...
@@ -14,8 +14,7 @@ use PHPUnit\Framework\TestCase;
* Class OnStringTest
* @package qfq
*/
class
OnStringTest
extends
TestCase
{
class
OnStringTest
extends
TestCase
{
/**
*
...
...
@@ -83,8 +82,8 @@ class OnStringTest extends TestCase
* @throws UserFormException
*/
public
function
testExtractFormRecordId
()
{
$arrId
=
array
();
$arrForm
=
array
();
$arrId
=
array
();
$arrForm
=
array
();
$this
->
assertEquals
(
''
,
OnString
::
splitPathInfoToIdForm
(
''
,
$arrId
,
$arrForm
));
$this
->
assertEquals
([],
$arrId
);
...
...
@@ -119,12 +118,12 @@ class OnStringTest extends TestCase
$this
->
assertEquals
([
'path1'
],
$arrForm
);
$this
->
assertEquals
(
'path2'
,
OnString
::
splitPathInfoToIdForm
(
'/path1/12/path2'
,
$arrId
,
$arrForm
));
$this
->
assertEquals
([
12
,
0
],
$arrId
);
$this
->
assertEquals
([
'path1'
,
'path2'
],
$arrForm
);
$this
->
assertEquals
([
12
,
0
],
$arrId
);
$this
->
assertEquals
([
'path1'
,
'path2'
],
$arrForm
);
$this
->
assertEquals
(
'path2'
,
OnString
::
splitPathInfoToIdForm
(
'/path1/12/path2/34'
,
$arrId
,
$arrForm
));
$this
->
assertEquals
([
12
,
34
],
$arrId
);
$this
->
assertEquals
([
'path1'
,
'path2'
],
$arrForm
);
$this
->
assertEquals
([
12
,
34
],
$arrId
);
$this
->
assertEquals
([
'path1'
,
'path2'
],
$arrForm
);
}
...
...
@@ -133,8 +132,11 @@ class OnStringTest extends TestCase
*
*/
public
function
testExtractFormRecordId_1
()
{
$arrId
=
array
();
$arrForm
=
array
();
# An alnum string is requested as path
$this
->
assertEquals
(
''
,
OnString
::
splitPathInfoToIdForm
(
'/%'
));
$this
->
assertEquals
(
''
,
OnString
::
splitPathInfoToIdForm
(
'/%'
,
$arrId
,
$arrForm
));
}
/**
...
...
@@ -142,8 +144,11 @@ class OnStringTest extends TestCase
*
*/
public
function
testExtractFormRecordId_2
()
{
$arrId
=
array
();
$arrForm
=
array
();
# A numerical value is requested as id
$this
->
assertEquals
(
''
,
OnString
::
splitPathInfoToIdForm
(
'/path1/path2'
));
$this
->
assertEquals
(
''
,
OnString
::
splitPathInfoToIdForm
(
'/path1/path2'
,
$arrId
,
$arrForm
));
}
/**
...
...
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