Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / layout_builder / tests / src / Unit / InlineBlockUsageTest.php
diff --git a/web/core/modules/layout_builder/tests/src/Unit/InlineBlockUsageTest.php b/web/core/modules/layout_builder/tests/src/Unit/InlineBlockUsageTest.php
new file mode 100644 (file)
index 0000000..49cba47
--- /dev/null
@@ -0,0 +1,28 @@
+<?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([]);
+  }
+
+}