You are here

class WatchdogLoggerTest in Service Container 7

Same name and namespace in other branches
  1. 7.2 tests/src/Logger/WatchdogLoggerTest.php \Drupal\Tests\service_container\Logger\WatchdogLoggerTest

@coversDefaultClass \Drupal\service_container\Logger\WatchdogLogger

Hierarchy

  • class \Drupal\Tests\service_container\Logger\WatchdogLoggerTest extends \Drupal\Tests\service_container\Logger\PHPUnit_Framework_TestCase

Expanded class hierarchy of WatchdogLoggerTest

File

tests/src/Logger/WatchdogLoggerTest.php, line 15
Contains \Drupal\Tests\service_container\Logger\WatchdogLoggerTest.

Namespace

Drupal\Tests\service_container\Logger
View source
class WatchdogLoggerTest extends \PHPUnit_Framework_TestCase {

  /**
   * The tested watchdog logger.
   *
   * @var \Drupal\service_container\Logger\WatchdogLogger
   */
  protected $watchdogLogger;

  /**
   * The Drupal 7 legacy service
   *
   * @var \Drupal\service_container\Legacy\Drupal7
   */
  protected $drupal7;

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();
    $this->drupal7 = \Mockery::mock('\\Drupal\\service_container\\Legacy\\Drupal7');
    $this->watchdogLogger = new WatchdogLogger($this->drupal7);
  }

  /**
   * @covers ::__construct()
   */
  public function test_construct() {
    $this
      ->assertInstanceOf('\\Drupal\\service_container\\Logger\\WatchdogLogger', $this->watchdogLogger);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
WatchdogLoggerTest::$drupal7 protected property The Drupal 7 legacy service
WatchdogLoggerTest::$watchdogLogger protected property The tested watchdog logger.
WatchdogLoggerTest::setUp protected function
WatchdogLoggerTest::test_construct public function @covers ::__construct()