LoggerChannelFactory example


class LoggerChannelFactoryTest extends UnitTestCase {

  /** * Tests LoggerChannelFactory::get(). * * @covers ::get */
  public function testGet() {
    $factory = new LoggerChannelFactory();
    $factory->setContainer($this->createMock('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'));
  }

}

    ]);

    $key_value_factory = new KeyValueMemoryFactory();
    $this->keyValue = $key_value_factory->get('media');

    $this->currentTime = time();
    $time = $this->prophesize('\Drupal\Component\Datetime\TimeInterface');
    $time->getCurrentTime()->willReturn($this->currentTime);

    $this->logger = $this->prophesize('\Psr\Log\LoggerInterface');
    $logger_factory = new LoggerChannelFactory();
    $logger_factory->addLogger($this->logger->reveal());

    $this->responses = new MockHandler();
    $client = new Client([
      'handler' => HandlerStack::create($this->responses),
    ]);
    $this->repository = new ProviderRepository(
      $client,
      $config_factory,
      $time->reveal(),
      $key_value_factory,
      
Home | Imprint | This part of the site doesn't use cookies.