Skip to content
Snippets Groups Projects
Commit 6238aabe authored by Angie Byron's avatar Angie Byron
Browse files

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

Issue #2443653 by bzrudi71, tstoeckler, daffie: PostgreSQL: Fix system\Tests\Condition\ConditionFormTest
parent 5ad41abb
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -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()) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment