Commit 6238aabe authored by webchick's avatar webchick

Issue #2443653 by bzrudi71, tstoeckler, daffie: PostgreSQL: Fix...

Issue #2443653 by bzrudi71, tstoeckler, daffie: PostgreSQL: Fix system\Tests\Condition\ConditionFormTest
parent 5ad41abb
......@@ -34,7 +34,9 @@ function testConfigForm() {
$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.');
}
......
......@@ -65,8 +65,10 @@ public function validateForm(array &$form, FormStateInterface $form_state) {
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()) {
......
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