You are here

public function InlineBlockUsageTest::testEmptyDeleteUsageCall in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/tests/src/Unit/InlineBlockUsageTest.php \Drupal\Tests\layout_builder\Unit\InlineBlockUsageTest::testEmptyDeleteUsageCall()

Tests calling deleteUsage() with empty array.

@covers ::deleteUsage

File

core/modules/layout_builder/tests/src/Unit/InlineBlockUsageTest.php, line 21

Class

InlineBlockUsageTest
@coversDefaultClass \Drupal\layout_builder\InlineBlockUsage

Namespace

Drupal\Tests\layout_builder\Unit

Code

public function testEmptyDeleteUsageCall() {
  $connection = $this
    ->prophesize(Connection::class);
  $connection
    ->delete('inline_block_usage')
    ->shouldNotBeCalled();
  (new InlineBlockUsage($connection
    ->reveal()))
    ->deleteUsage([]);
}