You are here

public function LoggerChannelFactoryTest::testGet in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/tests/Drupal/Tests/Core/Logger/LoggerChannelFactoryTest.php \Drupal\Tests\Core\Logger\LoggerChannelFactoryTest::testGet()

Tests LoggerChannelFactory::get().

@covers ::get

File

core/tests/Drupal/Tests/Core/Logger/LoggerChannelFactoryTest.php, line 24
Contains \Drupal\Tests\Core\Logger\LoggerChannelFactoryTest.

Class

LoggerChannelFactoryTest
@coversDefaultClass \Drupal\Core\Logger\LoggerChannelFactory @group Logger

Namespace

Drupal\Tests\Core\Logger

Code

public function testGet() {
  $factory = new LoggerChannelFactory();
  $factory
    ->setContainer($this
    ->getMock('Symfony\\Component\\DependencyInjection\\ContainerInterface'));

  // Ensure that when called with the same argument, always the same instance
  // will be returned.
  $this
    ->assertSame($factory
    ->get('test'), $factory
    ->get('test'));
}