You are here

class FeedsExTestFeedsSource in Feeds extensible parsers 7

A FeedsSource class used during testing.

Hierarchy

Expanded class hierarchy of FeedsExTestFeedsSource

1 string reference to 'FeedsExTestFeedsSource'
FeedsExUnitTests.test in src/Tests/FeedsExUnitTests.test

File

src/Tests/FeedsExTestFeedsSource.inc, line 11
Contains FeedsExTestFeedsSource.

View source
class FeedsExTestFeedsSource extends FeedsSource {

  /**
   * Log messages stored for later use.
   *
   * Each message has the following keys:
   * - type;
   * - message;
   * - variables;
   * - severity.
   *
   * @var array
   */
  protected $logMessages = array();

  /**
   * {@inheritdoc}
   */
  public function log($type, $message, $variables = array(), $severity = WATCHDOG_NOTICE) {
    $this->logMessages[] = array(
      'type' => $type,
      'message' => $message,
      'variables' => $variables,
      'severity' => $severity,
    );
  }

  /**
   * Returns the list of the log messages.
   *
   * @return array
   *   A list of log messages.
   */
  public function getLogMessages() {
    return $this->logMessages;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
FeedsExTestFeedsSource::$logMessages protected property Log messages stored for later use.
FeedsExTestFeedsSource::getLogMessages public function Returns the list of the log messages.
FeedsExTestFeedsSource::log public function