Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
PermissionsDeltaProvider example
/** * @internal */
class
PermissionsDeltaProviderTest
extends
TestCase
{
use
IntegrationTestBehaviour;
public
function
testGetName
(
)
: void
{
$expected
= 'permissions';
static
::
assertSame
(
$expected
, PermissionsDeltaProvider::DELTA_NAME
)
;
static
::
assertSame
(
$expected
,
(
new
PermissionsDeltaProvider
(
)
)
->
getDeltaName
(
)
)
;
}
public
function
testGetPermissionsDelta
(
)
: void
{
$context
= Context::
createDefaultContext
(
)
;
$manifest
=
$this
->
getTestManifest
(
)
;
$this
->
getAppLifecycle
(
)
->
install
(
$manifest
, false,
$context
)
;
$criteria
=
(
new
Criteria
(
)
)
->
addFilter
(
new
EqualsFilter
(
'name', 'test'
)
)