function ViewStorageTest::testConfigurationEntityCRUD

Same name in other branches
  1. 9 core/modules/views/tests/src/Kernel/ViewStorageTest.php \Drupal\Tests\views\Kernel\ViewStorageTest::testConfigurationEntityCRUD()
  2. 8.9.x core/modules/views/tests/src/Kernel/ViewStorageTest.php \Drupal\Tests\views\Kernel\ViewStorageTest::testConfigurationEntityCRUD()
  3. 11.x core/modules/views/tests/src/Kernel/ViewStorageTest.php \Drupal\Tests\views\Kernel\ViewStorageTest::testConfigurationEntityCRUD()

Tests CRUD operations.

File

core/modules/views/tests/src/Kernel/ViewStorageTest.php, line 61

Class

ViewStorageTest
Tests the CRUD functionality for a view.

Namespace

Drupal\Tests\views\Kernel

Code

public function testConfigurationEntityCRUD() : void {
    // Get the configuration entity type and controller.
    $this->entityType = \Drupal::entityTypeManager()->getDefinition('view');
    $this->controller = $this->container
        ->get('entity_type.manager')
        ->getStorage('view');
    // Confirm that an info array has been returned.
    $this->assertInstanceOf(EntityTypeInterface::class, $this->entityType);
    // CRUD tests.
    $this->loadTests();
    $this->createTests();
    $this->displayTests();
    // Helper method tests
    $this->displayMethodTests();
}

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