function EntityTypeWithoutViewsDataTest::testEntityTypeWithoutViewsData
Same name and namespace in other branches
- 9 core/modules/datetime_range/tests/src/Kernel/Views/EntityTypeWithoutViewsDataTest.php \Drupal\Tests\datetime_range\Kernel\Views\EntityTypeWithoutViewsDataTest::testEntityTypeWithoutViewsData()
- 10 core/modules/datetime_range/tests/src/Kernel/Views/EntityTypeWithoutViewsDataTest.php \Drupal\Tests\datetime_range\Kernel\Views\EntityTypeWithoutViewsDataTest::testEntityTypeWithoutViewsData()
- 11.x core/modules/datetime_range/tests/src/Kernel/Views/EntityTypeWithoutViewsDataTest.php \Drupal\Tests\datetime_range\Kernel\Views\EntityTypeWithoutViewsDataTest::testEntityTypeWithoutViewsData()
Tests the case when an entity type provides no views data.
See also
datetime_test_entity_type_alter()
File
-
core/
modules/ datetime_range/ tests/ src/ Kernel/ Views/ EntityTypeWithoutViewsDataTest.php, line 37
Class
- EntityTypeWithoutViewsDataTest
- Tests <a href="/api/drupal/core%21modules%21datetime_range%21datetime_range.module/8.9.x" title="Field hooks to implement a datetime field that stores a start and end date." class="local">datetime_range.module</a> when an entity type provides no views data.
Namespace
Drupal\Tests\datetime_range\Kernel\ViewsCode
public function testEntityTypeWithoutViewsData() {
$view_yaml = drupal_get_path('module', 'taxonomy') . '/' . InstallStorage::CONFIG_OPTIONAL_DIRECTORY . '/views.view.taxonomy_term.yml';
$values = Yaml::decode(file_get_contents($view_yaml));
$this->assertEquals(SAVED_NEW, View::create($values)->save());
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.