diff --git a/core/lib/Drupal/Core/Executable/ExecutableException.php b/core/lib/Drupal/Core/Executable/ExecutableException.php index 1f105c4..ae9b135 100644 --- a/core/lib/Drupal/Core/Executable/ExecutableException.php +++ b/core/lib/Drupal/Core/Executable/ExecutableException.php @@ -10,7 +10,7 @@ use Drupal\Component\Plugin\Exception\ExceptionInterface; /** - * Generic action exception class. + * Generic executable plugin exception class. */ class ExecutableException extends Exception implements ExceptionInterface { } diff --git a/core/lib/Drupal/Core/Executable/ExecutablePluginBase.php b/core/lib/Drupal/Core/Executable/ExecutablePluginBase.php index 509b221..b6a4688 100644 --- a/core/lib/Drupal/Core/Executable/ExecutablePluginBase.php +++ b/core/lib/Drupal/Core/Executable/ExecutablePluginBase.php @@ -98,8 +98,6 @@ public function getConfigDefinition($key) { * * @todo: This needs to go into an interface. * - * @see \Drupal\Component\Plugin\PluginBase::$configuration - * * @return array * The array of all configuration values, keyed by configuration option * name. diff --git a/core/modules/system/lib/Drupal/system/Tests/Condition/ConditionFormTest.php b/core/modules/system/lib/Drupal/system/Tests/Condition/ConditionFormTest.php index b76aac1..e191efe 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Condition/ConditionFormTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Condition/ConditionFormTest.php @@ -2,7 +2,7 @@ /** * @file - * Definition of Drupal\system\Tests\Condition\ConditionFormTest. + * Contains \Drupal\system\Tests\Condition\ConditionFormTest. */ namespace Drupal\system\Tests\Condition; @@ -32,11 +32,14 @@ public static function getInfo() { * Submit the condition_node_type_test_form to test condition forms. */ function testConfigForm() { + $article = entity_create('node', array('type' => 'article', 'title' => $this->randomName())); + $article->save(); $this->drupalGet('condition_test'); $this->assertField('bundles[article]', 'There is an article bundle selector.'); $this->assertField('bundles[page]', 'There is a page bundle selector.'); $this->drupalPost(NULL, array('bundles[page]' => 'page', 'bundles[article]' => 'article'), t('Submit')); $this->assertText('The bundles are article and page', 'The form component appropriately saved the bundles.'); + $this->assertText('Executed successfully.', 'The form configured condition executed properly.'); } } diff --git a/core/modules/system/tests/modules/condition_test/lib/Drupal/condition_test/FormController.php b/core/modules/system/tests/modules/condition_test/lib/Drupal/condition_test/FormController.php index cd47c89..35a5325 100644 --- a/core/modules/system/tests/modules/condition_test/lib/Drupal/condition_test/FormController.php +++ b/core/modules/system/tests/modules/condition_test/lib/Drupal/condition_test/FormController.php @@ -65,5 +65,10 @@ public function submitForm(array &$form, array &$form_state) { $config = $this->condition->getConfig(); $bundles = implode(' and ', $config['bundles']); drupal_set_message(t('The bundles are @bundles', array('@bundles' => $bundles))); + $article = node_load(1); + $this->condition->setContextValue('node', $article); + if ($this->condition->execute()) { + drupal_set_message(t('Executed successfully.')); + } } }