You are here

protected function EntityContext::getUser in Lightning Core 8

Same name and namespace in other branches
  1. 8.2 tests/contexts/EntityContext.behat.inc \Acquia\LightningExtension\Context\EntityContext::getUser()
2 calls to EntityContext::getUser()
EntityContext::onNodeCreate in tests/contexts/EntityContext.behat.inc
Reacts when a node is created by Drupal Extension's step definition.
EntityContext::save in tests/contexts/EntityContext.behat.inc
Saves an entity, ensuring automatic clean-up.

File

tests/contexts/EntityContext.behat.inc, line 248

Class

EntityContext
Contains miscellaneous step definitions for working with Drupal entities.

Namespace

Acquia\LightningExtension\Context

Code

protected function getUser() {
  $user = $this
    ->getUserManager()
    ->getCurrentUser();
  return $user ? $user->uid : 0;
}