function ViewStorageTest::testConfigurationEntityCRUD

Tests CRUD operations.

File

drupal/core/modules/views/lib/Drupal/views/Tests/ViewStorageTest.php, line 73
Definition of Drupal\views\Tests\ViewStorageTest.

Class

ViewStorageTest
Tests the functionality of View and ViewStorageController.

Namespace

Drupal\views\Tests

Code

function testConfigurationEntityCRUD() {

  // Get the configuration entity information and controller.
  $this->info = entity_get_info('view');
  $this->controller = $this->container
    ->get('plugin.manager.entity')
    ->getStorageController('view');

  // Confirm that an info array has been returned.
  $this
    ->assertTrue(!empty($this->info) && is_array($this->info), 'The View info array is loaded.');

  // Confirm we have the correct controller class.
  $this
    ->assertTrue($this->controller instanceof ViewStorageController, 'The correct controller is loaded.');

  // CRUD tests.
  $this
    ->loadTests();
  $this
    ->createTests();
  $this
    ->displayTests();

  // Helper method tests
  $this
    ->displayMethodTests();
}