Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
createSeoUrlInDatabase example
static
::
assertCount
(
2,
$seoUrls
)
;
$canon
=
$seoUrls
->
filterByProperty
(
'isCanonical', true
)
->
first
(
)
;
static
::
assertNotNull
(
$canon
)
;
static
::
assertTrue
(
$canon
->
getIsModified
(
)
)
;
static
::
assertNotEquals
(
'no-effect',
$canon
->
getSeoPathInfo
(
)
)
;
}
public
function
testUpdateSeoUrlsShouldMarkSeoUrlAsDeleted
(
)
: void
{
$category
=
$this
->
createCategory
(
false
)
;
$this
->
createSeoUrlInDatabase
(
$category
->
getId
(
)
,
$this
->salesChannel->
getId
(
)
)
;
$seoUrls
=
$this
->
generateSeoUrls
(
$category
->
getId
(
)
)
;
$this
->seoUrlPersister->
updateSeoUrls
(
Context::
createDefaultContext
(
)
,
TestNavigationSeoUrlRoute::ROUTE_NAME,
[
$category
->
getId
(
)
]
,
$seoUrls
,
$this
->salesChannel
)
;