Commit c2bc5206 authored by Berdir's avatar Berdir
Browse files

by Berdir: Update tests and deprecated usages

parent f15173c4
......@@ -355,7 +355,7 @@ class PathautoGenerator implements PathautoGeneratorInterface {
if ($type == 'taxonomy_term') {
$config_forum = $this->configFactory->get('forum.settings');
if ($entity->getVocabularyId() == $config_forum->get('vocabulary')) {
if ($entity->bundle() == $config_forum->get('vocabulary')) {
$type = 'forum';
}
}
......
......@@ -98,7 +98,7 @@ class ForumAliasType extends EntityAliasTypeBase implements ContainerFactoryPlug
if (parent::applies($object)) {
/** @var \Drupal\taxonomy\TermInterface $object */
$vid = $this->configFactory->get('forum.settings')->get('vocabulary');
return $object->getVocabularyId() == $vid;
return $object->bundle() == $vid;
}
return FALSE;
}
......
......@@ -44,11 +44,11 @@ class PathautoKernelTest extends KernelTestBase {
public function setUp() {
parent::setup();
$this->installConfig(['pathauto', 'taxonomy', 'system', 'node']);
$this->installEntitySchema('user');
$this->installEntitySchema('node');
$this->installEntitySchema('taxonomy_term');
$this->installConfig(['pathauto', 'taxonomy', 'system', 'node']);
ConfigurableLanguage::createFromLangcode('fr')->save();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment