use Drupal\Core\Cache\Cache;
use Drupal\Core\Link;
+use Drupal\taxonomy\TermStorageInterface;
use Drupal\Tests\UnitTestCase;
use Symfony\Component\DependencyInjection\Container;
$prophecy->getCacheMaxAge()->willReturn(Cache::PERMANENT);
$term2 = $prophecy->reveal();
- $forum_manager = $this->getMock('Drupal\forum\ForumManagerInterface');
- $forum_manager->expects($this->at(0))
- ->method('getParents')
+ $term_storage = $this->getMockBuilder(TermStorageInterface::class)->getMock();
+ $term_storage->expects($this->at(0))
+ ->method('loadAllParents')
->will($this->returnValue([$term1]));
- $forum_manager->expects($this->at(1))
- ->method('getParents')
+ $term_storage->expects($this->at(1))
+ ->method('loadAllParents')
->will($this->returnValue([$term1, $term2]));
// The root forum.
->method('getStorage')
->will($this->returnValueMap([
['taxonomy_vocabulary', $vocab_storage],
+ ['taxonomy_term', $term_storage],
]));
$config_factory = $this->getConfigFactoryStub(
]
);
+ $forum_manager = $this->getMock('Drupal\forum\ForumManagerInterface');
+
// Build a breadcrumb builder to test.
$breadcrumb_builder = $this->getMock(
'Drupal\forum\Breadcrumb\ForumListingBreadcrumbBuilder', NULL, [