EntityTestNoLoadStorage.php

Same filename in other branches
  1. 9 core/modules/system/tests/modules/entity_test/src/EntityTestNoLoadStorage.php
  2. 8.9.x core/modules/system/tests/modules/entity_test/src/EntityTestNoLoadStorage.php
  3. 11.x core/modules/system/tests/modules/entity_test/src/EntityTestNoLoadStorage.php

Namespace

Drupal\entity_test

File

core/modules/system/tests/modules/entity_test/src/EntityTestNoLoadStorage.php

View source
<?php

namespace Drupal\entity_test;

use Drupal\Core\Entity\EntityStorageException;
use Drupal\Core\Entity\Sql\SqlContentEntityStorage;

/**
 * Test storage class used to verify that no load operation is triggered.
 */
class EntityTestNoLoadStorage extends SqlContentEntityStorage {
    
    /**
     * {@inheritdoc}
     */
    public function load($id) {
        throw new EntityStorageException('No load operation is supposed to happen.');
    }

}

Classes

Title Deprecated Summary
EntityTestNoLoadStorage Test storage class used to verify that no load operation is triggered.

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