function BlockContentTranslationUITest::getEditValues

Same name and namespace in other branches
  1. 9 core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php \Drupal\Tests\block_content\Functional\BlockContentTranslationUITest::getEditValues()
  2. 8.9.x core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php \Drupal\Tests\block_content\Functional\BlockContentTranslationUITest::getEditValues()
  3. 10 core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php \Drupal\Tests\block_content\Functional\BlockContentTranslationUITest::getEditValues()

Returns an edit array containing the values to be posted.

Overrides ContentTranslationUITestBase::getEditValues

File

core/modules/block_content/tests/src/Functional/BlockContentTranslationUITest.php, line 100

Class

BlockContentTranslationUITest
Tests the block content translation UI.

Namespace

Drupal\Tests\block_content\Functional

Code

protected function getEditValues($values, $langcode, $new = FALSE) {
    $edit = parent::getEditValues($values, $langcode, $new);
    foreach ($edit as $property => $value) {
        if ($property == 'info') {
            $edit['info[0][value]'] = $value;
            unset($edit[$property]);
        }
    }
    return $edit;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.