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. 8.9.x core/modules/field_layout/tests/src/Kernel/FieldLayoutEntityDisplayTest.php \Drupal\Tests\field_layout\Kernel\FieldLayoutEntityDisplayTest::assertEntityValues()
  3. 10 core/modules/field_layout/tests/src/Kernel/FieldLayoutEntityDisplayTest.php \Drupal\Tests\field_layout\Kernel\FieldLayoutEntityDisplayTest::assertEntityValues()

Asserts than an entity has the correct values.

@internal

Parameters

array $expected: The expected values.

array $values: The actual values.

string $message: (optional) An error 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 190

Class

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

Namespace

Drupal\Tests\field_layout\Kernel

Code

public static function assertEntityValues(array $expected, array $values, string $message = '') : void {
    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.