Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
withoutAttribute example
$this
->
assertEquals
(
'you',
$link
->
getAttributes
(
)
[
'me'
]
)
;
}
public
function
testCanRemoveValues
(
)
{
$link
=
(
new
Link
(
)
)
->
withHref
(
'http://www.google.com'
)
->
withRel
(
'next'
)
->
withAttribute
(
'me', 'you'
)
;
$link
=
$link
->
withoutAttribute
(
'me'
)
->
withoutRel
(
'next'
)
;
$this
->
assertEquals
(
'http://www.google.com',
$link
->
getHref
(
)
)
;
$this
->
assertFalse
(
\
in_array
(
'next',
$link
->
getRels
(
)
)
)
;
$this
->
assertArrayNotHasKey
(
'me',
$link
->
getAttributes
(
)
)
;
}
public
function
testMultipleRels
(
)
{
$link
=
(
new
Link
(
)
)
->
withHref
(
'http://www.google.com'
)