function FieldLayoutEntityDisplayTest::assertEntityValues

Same name in other branches
  1. 9 core/modules/field_layout/tests/src/Kernel/FieldLayoutEntityDisplayTest.php \Drupal\Tests\field_layout\Kernel\FieldLayoutEntityDisplayTest::assertEntityValues()
  2. 10 core/modules/field_layout/tests/src/Kernel/FieldLayoutEntityDisplayTest.php \Drupal\Tests\field_layout\Kernel\FieldLayoutEntityDisplayTest::assertEntityValues()
  3. 11.x core/modules/field_layout/tests/src/Kernel/FieldLayoutEntityDisplayTest.php \Drupal\Tests\field_layout\Kernel\FieldLayoutEntityDisplayTest::assertEntityValues()

Asserts than an entity has the correct values.

Parameters

mixed $expected:

array $values:

string $message:

1 call to FieldLayoutEntityDisplayTest::assertEntityValues()
FieldLayoutEntityDisplayTest::testPreSave in core/modules/field_layout/tests/src/Kernel/FieldLayoutEntityDisplayTest.php
@covers ::preSave @covers ::calculateDependencies

File

core/modules/field_layout/tests/src/Kernel/FieldLayoutEntityDisplayTest.php, line 182

Class

FieldLayoutEntityDisplayTest
@coversDefaultClass \Drupal\field_layout\Entity\FieldLayoutEntityDisplayTrait @group field_layout

Namespace

Drupal\Tests\field_layout\Kernel

Code

public static function assertEntityValues($expected, array $values, $message = '') {
    static::assertArrayHasKey('uuid', $values);
    unset($values['uuid']);
    static::assertEquals($expected, $values, $message);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.