Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | Protected Attributes | List of all members
eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext Class Reference

Sentences for Roles. More...

Inheritance diagram for eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext:

## Public Member Functions
| __construct (Repository $repository, RoleService $roleService)
| @injectService $repository @ezpublish.api.repository @injectService $roleService @ezpublish.api.service.role More...
| ensureRoleExists ($name)
| Make sure a Role with name $name exists in parent group. More...
| getRole ($identifier)
| Fetches the role with identifier. More...
| iHaveRole ($name)
| @Given a/an :name role exists More...
| iSeeRole ($name)
| @Then I see that a/an :name role exists More...
| noAssginedPolicies ($name)
| @Given :name do not have any assigned policies More...
| noAssigneGroups ($name)
| @Given :name do not have any assigned Users and groups More...
| iDontSeeRole ($name)
| @Then I see that a/an :name role does not exists More...

## Protected Attributes
| $roleService

## Detailed Description

Sentences for Roles.

Definition at line 19 of file RoleContext.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext::__construct | ( | Repository | $repository,
|  | RoleService | $roleService
| ) |  |

@injectService $repository @ezpublish.api.repository @injectService $roleService @ezpublish.api.service.role

Definition at line 30 of file RoleContext.php.

References eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext\$roleService.

## Member Function Documentation

## ◆ ensureRoleExists()

eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext::ensureRoleExists | ( |  | $name | ) |

Make sure a Role with name $name exists in parent group.

Parameters

  string | $name | Role identifier

Returns
  \eZ\Publish\API\Repository\Values\User\Role

Definition at line 43 of file RoleContext.php.

Referenced by eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext\iHaveRole().

## ◆ getRole()

eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext::getRole | ( |  | $identifier | ) |

Fetches the role with identifier.

Parameters

  string | $identifier | Role identifier

Returns
  \eZ\Publish\API\Repository\Values\User\Role

Definition at line 64 of file RoleContext.php.

Referenced by eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext\iDontSeeRole(), eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext\iSeeRole(), eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext\noAssginedPolicies(), and eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext\noAssigneGroups().

## ◆ iDontSeeRole()

eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext::iDontSeeRole | ( |  | $name | ) |

@Then I see that a/an :name role does not exists

Verifies that a role with $name exists.

Definition at line 135 of file RoleContext.php.

References eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext\getRole().

## ◆ iHaveRole()

eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext::iHaveRole | ( |  | $name | ) |

@Given a/an :name role exists

Ensures a role exists with name ':name', creating a new one if necessary.

Returns
  \eZ\Publish\API\Repository\Values\User\Role

Definition at line 83 of file RoleContext.php.

References eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext\ensureRoleExists().

## ◆ iSeeRole()

eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext::iSeeRole | ( |  | $name | ) |

@Then I see that a/an :name role exists

Verifies that a role with $name exists.

Definition at line 93 of file RoleContext.php.

References eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext\getRole().

## ◆ noAssginedPolicies()

eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext::noAssginedPolicies | ( |  | $name | ) |

@Given :name do not have any assigned policies

Definition at line 105 of file RoleContext.php.

References eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext\getRole().

## ◆ noAssigneGroups()

eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext::noAssigneGroups | ( |  | $name | ) |

@Given :name do not have any assigned Users and groups

Definition at line 119 of file RoleContext.php.

References eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext\getRole().

## Member Data Documentation

## ◆ $roleService

eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext::$roleService
| protected

Definition at line 24 of file RoleContext.php.

Referenced by eZ\Bundle\EzPublishCoreBundle\Features\Context\RoleContext\__construct().

The documentation for this class was generated from the following file:

- RoleContext.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.