You are here

InlineBlockUsageTest.php in Drupal 9

Same filename and directory in other branches
  1. 8 core/modules/layout_builder/tests/src/Unit/InlineBlockUsageTest.php

File

core/modules/layout_builder/tests/src/Unit/InlineBlockUsageTest.php
View source
<?php

namespace Drupal\Tests\layout_builder\Unit;

use Drupal\Core\Database\Connection;
use Drupal\layout_builder\InlineBlockUsage;
use Drupal\Tests\UnitTestCase;

/**
 * @coversDefaultClass \Drupal\layout_builder\InlineBlockUsage
 *
 * @group layout_builder
 */
class InlineBlockUsageTest extends UnitTestCase {

  /**
   * Tests calling deleteUsage() with empty array.
   *
   * @covers ::deleteUsage
   */
  public function testEmptyDeleteUsageCall() {
    $connection = $this
      ->prophesize(Connection::class);
    $connection
      ->delete('inline_block_usage')
      ->shouldNotBeCalled();
    (new InlineBlockUsage($connection
      ->reveal()))
      ->deleteUsage([]);
  }

}

Classes