Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
assertMediaHasNoFolder example
$mediaFolder
=
$this
->mediaFolderRepo
->
search
(
new
Criteria
(
array_filter
(
[
$mediaFolderId
]
)
)
,
$this
->context
)
->
get
(
$mediaFolderId
)
;
static
::
assertInstanceOf
(
MediaFolderEntity::
class
,
$mediaFolder
)
;
$configId
=
$mediaFolder
->
getConfigurationId
(
)
;
$this
->mediaFolderService->
dissolve
(
$mediaFolderId
,
$this
->context
)
;
$this
->
assertMediaFolderIsDeleted
(
$media
)
;
$this
->
assertMediaHasNoFolder
(
$media
)
;
static
::
assertIsString
(
$configId
)
;
$this
->
assertConfigIsDeleted
(
$configId
)
;
}
public
function
testDissolveChildToRootLevel
(
)
: void
{
$this
->
setFixtureContext
(
$this
->context
)
;
$media
=
$this
->
getJpgWithFolder
(
)
;
$childId
= Uuid::
randomHex
(
)
;
$configId
= Uuid::
randomHex
(
)
;