From c4c602a9c9273b9e4cecc36f9771f529a3779bbf Mon Sep 17 00:00:00 2001 From: Seth Shaw Date: Thu, 3 Sep 2020 18:22:32 +0000 Subject: [PATCH] add deleting node to test --- .../tests/src/Functional/BreadcrumbsTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/islandora_breadcrumbs/tests/src/Functional/BreadcrumbsTest.php b/modules/islandora_breadcrumbs/tests/src/Functional/BreadcrumbsTest.php index 18fa030e..80f5dbee 100644 --- a/modules/islandora_breadcrumbs/tests/src/Functional/BreadcrumbsTest.php +++ b/modules/islandora_breadcrumbs/tests/src/Functional/BreadcrumbsTest.php @@ -114,6 +114,18 @@ class BreadcrumbsTest extends IslandoraFunctionalTestBase { // We should still escape it and have the same trail as before. $this->assertBreadcrumb($this->nodeD->toUrl()->toString(), $breadcrumbs); + + // Delete 'A', removing it from the chain. + $this->nodeA->delete(); + + // The new breadcrumb chain without 'A'. + $breadcrumbs = [ + Url::fromRoute('')->toString() => 'Home', + $this->nodeB->toUrl()->toString() => $this->nodeB->label(), + $this->nodeC->toUrl()->toString() => $this->nodeC->label(), + ]; + + $this->assertBreadcrumb($this->nodeD->toUrl()->toString(), $breadcrumbs); } }