function EntityViewsWithMultivalueBaseFieldTest::testView
Same name in other branches
- 9 core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php \Drupal\Tests\views\Kernel\Entity\EntityViewsWithMultivalueBasefieldTest::testView()
- 8.9.x core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php \Drupal\Tests\views\Kernel\Entity\EntityViewsWithMultivalueBasefieldTest::testView()
- 10 core/modules/views/tests/src/Kernel/Entity/EntityViewsWithMultivalueBasefieldTest.php \Drupal\Tests\views\Kernel\Entity\EntityViewsWithMultivalueBasefieldTest::testView()
Tests entity views with multivalue base fields.
File
-
core/
modules/ views/ tests/ src/ Kernel/ Entity/ EntityViewsWithMultivalueBaseFieldTest.php, line 42
Class
- EntityViewsWithMultivalueBaseFieldTest
- Tests entity views with multivalue base fields.
Namespace
Drupal\Tests\views\Kernel\EntityCode
public function testView() : void {
EntityTestMultiValueBaseField::create([
'name' => 'test',
])->save();
EntityTestMultiValueBaseField::create([
'name' => [
'test2',
'test3',
],
])->save();
$view = Views::getView('test_entity_multivalue_basefield');
$view->execute();
$this->assertIdenticalResultset($view, [
[
'name' => [
'test',
],
],
[
'name' => [
'test2',
'test3',
],
],
], [
'name' => 'name',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.