You are here

public function LoggerChannelTest::test_setCurrentUser in Service Container 7

Same name and namespace in other branches
  1. 7.2 tests/src/Logger/LoggerChannelTest.php \Drupal\Tests\service_container\Logger\LoggerChannelTest::test_setCurrentUser()

@covers ::setCurrentUser()

File

tests/src/Logger/LoggerChannelTest.php, line 167
Contains \Drupal\Tests\service_container\Logger\LoggerChannelTest.

Class

LoggerChannelTest
@coversDefaultClass \Drupal\service_container\Logger\LoggerChannel

Namespace

Drupal\Tests\service_container\Logger

Code

public function test_setCurrentUser() {
  $current_user = \Mockery::mock('alias:Drupal\\Core\\Session\\AccountInterface');
  $this->loggerChannel
    ->setCurrentUser($current_user);
  $this
    ->assertAttributeEquals($current_user, 'currentUser', $this->loggerChannel);
}