You are here

trait ApigeeEdgeKernelTestTrait in Apigee Edge 8

Provides common functionality for the Apigee Edge kernel test classes.

Hierarchy

4 files declare their use of ApigeeEdgeKernelTestTrait
AppListBuilderTest.php in tests/src/Kernel/Entity/ListBuilder/AppListBuilderTest.php
AppWarningsCheckerTest.php in tests/src/Kernel/Entity/AppWarningsCheckerTest.php
EntityListBuilderTest.php in tests/src/Kernel/Entity/ListBuilder/EntityListBuilderTest.php
TeamViewBuilderTest.php in modules/apigee_edge_teams/tests/src/Kernel/Entity/TeamViewBuilderTest.php

File

tests/src/Kernel/ApigeeEdgeKernelTestTrait.php, line 26

Namespace

Drupal\Tests\apigee_edge\Kernel
View source
trait ApigeeEdgeKernelTestTrait {

  /**
   * Log the given exception using the class short name as type.
   *
   * @param \Exception $exception
   *   Exception to log.
   * @param string $suffix
   *   Suffix for type string.
   */
  protected function logException(\Exception $exception, string $suffix = '') {
    $ro = new \ReflectionObject($this);
    watchdog_exception("{$ro->getShortName()}{$suffix}", $exception);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ApigeeEdgeKernelTestTrait::logException protected function Log the given exception using the class short name as type.