Further Drupal 8.6.4 changes. Some core files were not committed before a commit...
[yaffs-website] / web / core / modules / layout_builder / tests / src / Unit / InlineBlockUsageTest.php
1 <?php
2
3 namespace Drupal\Tests\layout_builder\Unit;
4
5 use Drupal\Core\Database\Connection;
6 use Drupal\layout_builder\InlineBlockUsage;
7 use Drupal\Tests\UnitTestCase;
8
9 /**
10  * @coversDefaultClass \Drupal\layout_builder\InlineBlockUsage
11  *
12  * @group layout_builder
13  */
14 class InlineBlockUsageTest extends UnitTestCase {
15
16   /**
17    * Tests calling deleteUsage() with empty array.
18    *
19    * @covers ::deleteUsage
20    */
21   public function testEmptyDeleteUsageCall() {
22     $connection = $this->prophesize(Connection::class);
23     $connection->delete('inline_block_usage')->shouldNotBeCalled();
24
25     (new InlineBlockUsage($connection->reveal()))->deleteUsage([]);
26   }
27
28 }