Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
ignoreCase example
$this
->
assertSame
(
null !==
$instance
->
indexOf
(
$needle
)
,
$instance
->
containsAny
(
$needle
)
)
;
}
/** * @dataProvider provideIndexOfIgnoreCase */
public
function
testContainsAnyIgnoreCase
(
?int
$result
, string
$string
,
$needle
)
{
$instance
=
static
::
createFromString
(
$string
)
;
$this
->
assertSame
(
null !==
$instance
->
ignoreCase
(
)
->
indexOf
(
$needle
)
,
$instance
->
ignoreCase
(
)
->
containsAny
(
$needle
)
)
;
}
public
function
testUnwrap
(
)
{
$expected
=
[
'hello', 'world'
]
;
$s
=
static
::
createFromString
(
''
)
;
$actual
=
$s
::
unwrap
(
[
static
::
createFromString
(
'hello'
)
,
static
::
createFromString
(
'world'
)
]
)
;
$this
->
assertEquals
(
$expected
,
$actual
)
;
}