src/DrupalExtension/Context/ContentContext.php
public function userCanContent($name, $op, $title) {
    $op = strtr($op, ['edit' => 'update']);
    $node = $this->getCore()->loadNodeByName($title);
    $access = $this->getCore()->nodeAccess($op, $name, $node);
    if (!$access) {
      throw new \Exception("{$name} cannot {$op} '{$title}' but it is supposed to.");
    }
  }
public function userCanContent($name, $op, $title) {
    $op = strtr($op, ['edit' => 'update']);
    $node = $this->getCore()->loadNodeByName($title);
    $access = $this->getCore()->nodeAccess($op, $name, $node);
    if (!$access) {
      throw new \Exception("{$name} cannot {$op} '{$title}' but it is supposed to.");
    }
  }
public function userCanContent ( $ name , $ op , $ title ) { $ op = strtr ( $ op , [ 'edit' => 'update' ] ) ; $ node = $ this -> getCore ( ) -> loadNodeByName ( $ title ) ; $ access = $ this -> getCore ( ) -> nodeAccess ( $ op , $ name , $ node ) ; if ( ! $ access ) { throw new \ Exception ( "{$name} cannot {$op} '{$title}' but it is supposed to." ) ; } }
Assert that given user can perform given operation on given content.

@param string $name
User name.
@param string $op
Operation: view, edit or delete.
@param string $title
Content title.

@throws \Exception
If user cannot perform given operation on given content.

@Then :name can :op content :content
@Then :name can :op :content content
Assert that given user can perform given operation on given content .