public function FieldTest::testConstruct in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/views/tests/src/Unit/Plugin/field/FieldTest.php \Drupal\Tests\views\Unit\Plugin\field\FieldTest::testConstruct()
@covers ::__construct
File
- core/
modules/ views/ tests/ src/ Unit/ Plugin/ field/ FieldTest.php, line 103 - Contains \Drupal\Tests\views\Unit\Plugin\field\FieldTest.
Class
- FieldTest
- @coversDefaultClass \Drupal\views\Plugin\views\field\Field @group views
Namespace
Drupal\Tests\views\Unit\Plugin\fieldCode
public function testConstruct() {
$definition = [
'entity_type' => 'test_entity',
// Just provide 'entity field' as definition. This is how EntityViewsData
// provides it.
'entity field' => 'title',
];
$handler = new Field([], 'field', $definition, $this->entityManager, $this->formatterPluginManager, $this->fieldTypePluginManager, $this->languageManager, $this->renderer);
$this
->assertEquals('title', $handler->definition['field_name']);
}