diff --git a/src/Plugin/Condition/EntityBundle.php b/src/Plugin/Condition/EntityBundle.php index 4803fd49..fc1a7960 100644 --- a/src/Plugin/Condition/EntityBundle.php +++ b/src/Plugin/Condition/EntityBundle.php @@ -8,8 +8,10 @@ use Drupal\Core\Form\FormStateInterface; /** * Provides a 'Entity Bundle' condition. * + * Namespaced to avoid conflict with ctools entity_bundle plugin. + * * @Condition( - * id = "entity_bundle", + * id = "islandora_entity_bundle", * label = @Translation("Entity Bundle"), * context_definitions = { * "node" = @ContextDefinition("entity:node", required = FALSE, label = @Translation("Node")), @@ -18,7 +20,7 @@ use Drupal\Core\Form\FormStateInterface; * } * ) */ -class EntityBundle extends ConditionPluginBase { +class IslandoraEntityBundle extends ConditionPluginBase { /** * {@inheritdoc} diff --git a/tests/src/Functional/EntityBundleTest.php b/tests/src/Functional/EntityBundleTest.php index 1ffc261e..710bb84e 100644 --- a/tests/src/Functional/EntityBundleTest.php +++ b/tests/src/Functional/EntityBundleTest.php @@ -7,12 +7,12 @@ namespace Drupal\Tests\islandora\Functional; * * @group islandora */ -class EntityBundleTest extends IslandoraFunctionalTestBase { +class IslandoraEntityBundleTest extends IslandoraFunctionalTestBase { /** - * @covers \Drupal\islandora\Plugin\Condition\EntityBundle::buildConfigurationForm - * @covers \Drupal\islandora\Plugin\Condition\EntityBundle::submitConfigurationForm - * @covers \Drupal\islandora\Plugin\Condition\EntityBundle::evaluate + * @covers \Drupal\islandora\Plugin\Condition\IslandoraEntityBundle::buildConfigurationForm + * @covers \Drupal\islandora\Plugin\Condition\IslandoraEntityBundle::submitConfigurationForm + * @covers \Drupal\islandora\Plugin\Condition\IslandoraEntityBundle::evaluate */ public function testEntityBundleType() { // Create a test user. @@ -24,7 +24,7 @@ class EntityBundleTest extends IslandoraFunctionalTestBase { $this->drupalLogin($account); $this->createContext('Test', 'test'); - $this->addCondition('test', 'entity_bundle'); + $this->addCondition('test', 'islandora_entity_bundle'); $this->getSession()->getPage()->checkField("edit-conditions-entity-bundle-bundles-test-type"); $this->getSession()->getPage()->findById("edit-conditions-entity-bundle-context-mapping-node")->selectOption("@node.node_route_context:node"); $this->getSession()->getPage()->pressButton(t('Save and continue')); diff --git a/tests/src/Functional/JsonldTypeAlterReactionTest.php b/tests/src/Functional/JsonldTypeAlterReactionTest.php index 0232518b..79b02a8f 100644 --- a/tests/src/Functional/JsonldTypeAlterReactionTest.php +++ b/tests/src/Functional/JsonldTypeAlterReactionTest.php @@ -70,7 +70,7 @@ class JsonldTypeAlterReactionTest extends JsonldSelfReferenceReactionTest { $this->assertSession() ->pageTextContains("The context $context_name has been saved"); - $this->addCondition('test', 'entity_bundle'); + $this->addCondition('test', 'islandora_entity_bundle'); $this->getSession()->getPage()->checkField("edit-conditions-entity-bundle-bundles-test-type"); $this->getSession()->getPage()->findById("edit-conditions-entity-bundle-context-mapping-node")->selectOption("@node.node_route_context:node"); $this->getSession()->getPage()->pressButton(t('Save and continue'));