diff --git a/core_search_facets/src/Tests/IntegrationTest.php b/core_search_facets/src/Tests/IntegrationTest.php index 855b125..0eeecd9 100644 --- a/core_search_facets/src/Tests/IntegrationTest.php +++ b/core_search_facets/src/Tests/IntegrationTest.php @@ -40,7 +40,7 @@ class IntegrationTest extends WebTestBase { /** * Tests various operations via the Facets' admin UI. */ - public function xxtestFramework() { + public function testFramework() { $facet_name = "Test Facet name"; $facet_id = 'test_facet_name'; @@ -133,7 +133,7 @@ class IntegrationTest extends WebTestBase { $this->clickLink('March 9, 2016'); $this->assertResponse(200); - $this->assertLink('10 PM'); + $this->assertLink('10 AM'); $this->assertLink('12 PM'); $this->drupalGet('search/node', ['query' => ['keys' => 'test']]); diff --git a/src/Plugin/facets/widget/LinksWidget.php b/src/Plugin/facets/widget/LinksWidget.php index fa56bae..9d2fa7f 100644 --- a/src/Plugin/facets/widget/LinksWidget.php +++ b/src/Plugin/facets/widget/LinksWidget.php @@ -66,8 +66,10 @@ class LinksWidget implements WidgetInterface { protected function buildListItems(ResultInterface $result, $show_numbers) { if ($children = $result->getChildren()) { $link = $this->prepareLink($result, $show_numbers); + + $children_markup = []; foreach ($children as $child) { - $children[] = $this->buildChildren($child, $show_numbers); + $children_markup[] = $this->buildChildren($child, $show_numbers); } $items = [ @@ -75,7 +77,7 @@ class LinksWidget implements WidgetInterface { '#wrapper_attributes' => [ 'class' => ['expanded'], ], - 'children' => [$children], + 'children' => [$children_markup], ]; }