private function EntityEventVariablesTest::assertAbstractEntityEventVariables in Hook Event Dispatcher 8
Test the default entity event variable methods.
Parameters
\Drupal\hook_event_dispatcher\Event\Preprocess\Variables\AbstractEntityEventVariables $variables: Variables object.
\Drupal\Tests\hook_event_dispatcher\Unit\Preprocess\Helpers\EntityMock $entity: Entity mock.
5 calls to EntityEventVariablesTest::assertAbstractEntityEventVariables()
- EntityEventVariablesTest::testCommentEvent in tests/
src/ Unit/ Preprocess/ EntityEventVariablesTest.php - Test a CommentPreprocessEvent.
- EntityEventVariablesTest::testEckEntityEvent in tests/
src/ Unit/ Preprocess/ EntityEventVariablesTest.php - Test a EckEntityPreprocessEvent.
- EntityEventVariablesTest::testNodeEvent in tests/
src/ Unit/ Preprocess/ EntityEventVariablesTest.php - Test a NodePreprocessEvent.
- EntityEventVariablesTest::testParagraphEvent in tests/
src/ Unit/ Preprocess/ EntityEventVariablesTest.php - Test a ParagraphPreprocessEvent.
- EntityEventVariablesTest::testTaxonomyTermEvent in tests/
src/ Unit/ Preprocess/ EntityEventVariablesTest.php - Test a TaxonomyTermPreprocessEvent.
File
- tests/
src/ Unit/ Preprocess/ EntityEventVariablesTest.php, line 144
Class
- EntityEventVariablesTest
- Class EntityEventVariablesTest.
Namespace
Drupal\Tests\hook_event_dispatcher\Unit\PreprocessCode
private function assertAbstractEntityEventVariables(AbstractEntityEventVariables $variables, EntityMock $entity) {
$this
->assertAbstractEventVariables($variables);
$this
->assertSame($entity, $variables
->getEntity());
$this
->assertSame($entity
->getEntityType(), $variables
->getEntityType());
$this
->assertSame($entity
->bundle(), $variables
->getEntityBundle());
$this
->assertSame($entity
->getViewMode(), $variables
->getViewMode());
}