You are here

public function EntityPagerAnalyzerTest::mockSubscriberLog in Entity Pager 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Unit/EntityPagerAnalyzerTest.php \Drupal\Tests\entity_pager\Unit\EntityPagerAnalyzerTest::mockSubscriberLog()

Event subscription mock function for ::testAnalyze().

Parameters

mixed $event: The analyze event.

Return value

bool Returns TRUE if given an \Drupal\entity_pager\Event\EntityPagerAnalyzeEvent, FALSE otherwise.

File

tests/src/Unit/EntityPagerAnalyzerTest.php, line 89

Class

EntityPagerAnalyzerTest
@coversDefaultClass \Drupal\entity_pager\EntityPagerAnalyzer @group entity_pager

Namespace

Drupal\Tests\entity_pager\Unit

Code

public function mockSubscriberLog($event) {
  if ($event instanceof EntityPagerAnalyzeEvent) {
    $event
      ->log($this->logs);
    $this
      ->assertSame($this->entityPager, $event
      ->getEntityPager());
    return TRUE;
  }
  return FALSE;
}