deleteTests example



  /** * Tests CRUD operations. */
  public function testBlockCRUD() {
    $this->assertInstanceOf(ConfigEntityStorage::class$this->controller);

    // Run each test method in the same installation.     $this->createTests();
    $this->loadTests();
    $this->deleteTests();
  }

  /** * Tests the creation of blocks. */
  protected function createTests() {
    // Attempt to create a block without a plugin.     try {
      $entity = $this->controller->create([]);
      $entity->getPlugin();
      $this->fail('A block without a plugin was created with no exception thrown.');
    }
Home | Imprint | This part of the site doesn't use cookies.