public function EntityAnalyzerSubscriberTest::testEntityPagerAnalyze in Entity Pager 8
Same name and namespace in other branches
- 2.0.x tests/src/Unit/EntityAnalyzerSubscriberTest.php \Drupal\Tests\entity_pager\Unit\EntityAnalyzerSubscriberTest::testEntityPagerAnalyze()
@covers ::onEntityPagerAnalyze @dataProvider onEntityPagerAnalyzeTestCases
File
- tests/
src/ Unit/ EntityAnalyzerSubscriberTest.php, line 21
Class
- EntityAnalyzerSubscriberTest
- @coversDefaultClass \Drupal\entity_pager\EventSubscriber\EntityAnalyzerSubscriber @group entity_pager
Namespace
Drupal\Tests\entity_pager\UnitCode
public function testEntityPagerAnalyze($entity, $logs) {
$entity_pager = $this
->createMock(EntityPagerInterface::class);
$entity_pager
->method('getEntity')
->willReturn($entity);
$event = new EntityPagerAnalyzeEvent($entity_pager);
(new EntityAnalyzerSubscriber())
->onEntityPagerAnalyze($event);
$this
->assertEquals($logs, $event
->getLogs());
}