From 6238aabe9e55f94dedfa2a291bb2a8bbf4e96de1 Mon Sep 17 00:00:00 2001 From: webchick Date: Sat, 7 Mar 2015 09:56:24 +1100 Subject: [PATCH] Issue #2443653 by bzrudi71, tstoeckler, daffie: PostgreSQL: Fix system\Tests\Condition\ConditionFormTest --- .../system/src/Tests/Condition/ConditionFormTest.php | 4 +++- .../tests/modules/condition_test/src/FormController.php | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/modules/system/src/Tests/Condition/ConditionFormTest.php b/core/modules/system/src/Tests/Condition/ConditionFormTest.php index 2ccb51d5e19..2e59800b45b 100644 --- a/core/modules/system/src/Tests/Condition/ConditionFormTest.php +++ b/core/modules/system/src/Tests/Condition/ConditionFormTest.php @@ -34,7 +34,9 @@ class ConditionFormTest extends WebTestBase { $this->assertField('bundles[article]', 'There is an article bundle selector.'); $this->assertField('bundles[page]', 'There is a page bundle selector.'); $this->drupalPostForm(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.'); + // @see \Drupal\condition_test\FormController::submitForm() + $this->assertText('Bundle: page'); + $this->assertText('Bundle: article'); $this->assertText('Executed successfully.', 'The form configured condition executed properly.'); } diff --git a/core/modules/system/tests/modules/condition_test/src/FormController.php b/core/modules/system/tests/modules/condition_test/src/FormController.php index 99f9890059b..4bf123043b4 100644 --- a/core/modules/system/tests/modules/condition_test/src/FormController.php +++ b/core/modules/system/tests/modules/condition_test/src/FormController.php @@ -65,8 +65,10 @@ class FormController implements FormInterface { public function submitForm(array &$form, FormStateInterface $form_state) { $this->condition->submitConfigurationForm($form, $form_state); $config = $this->condition->getConfig(); - $bundles = implode(' and ', $config['bundles']); - drupal_set_message(t('The bundles are @bundles', array('@bundles' => $bundles))); + foreach ($config['bundles'] as $bundle) { + drupal_set_message('Bundle: ' . $bundle); + } + $article = Node::load(1); $this->condition->setContextValue('node', $article); if ($this->condition->execute()) {