public function LingotekFieldBodyBulkDebugTest::testDebugExport in Lingotek Translation 3.8.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/LingotekFieldBodyBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkDebugTest::testDebugExport()
- 4.0.x tests/src/Functional/LingotekFieldBodyBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkDebugTest::testDebugExport()
- 3.0.x tests/src/Functional/LingotekFieldBodyBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkDebugTest::testDebugExport()
- 3.1.x tests/src/Functional/LingotekFieldBodyBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkDebugTest::testDebugExport()
- 3.2.x tests/src/Functional/LingotekFieldBodyBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkDebugTest::testDebugExport()
- 3.3.x tests/src/Functional/LingotekFieldBodyBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkDebugTest::testDebugExport()
- 3.4.x tests/src/Functional/LingotekFieldBodyBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkDebugTest::testDebugExport()
- 3.5.x tests/src/Functional/LingotekFieldBodyBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkDebugTest::testDebugExport()
- 3.6.x tests/src/Functional/LingotekFieldBodyBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkDebugTest::testDebugExport()
- 3.7.x tests/src/Functional/LingotekFieldBodyBulkDebugTest.php \Drupal\Tests\lingotek\Functional\LingotekFieldBodyBulkDebugTest::testDebugExport()
File
- tests/
src/ Functional/ LingotekFieldBodyBulkDebugTest.php, line 65
Class
- LingotekFieldBodyBulkDebugTest
- Tests debugging a field using the bulk management form.
Namespace
Drupal\Tests\lingotek\FunctionalCode
public function testDebugExport() {
// Login as admin.
$this
->drupalLogin($this->rootUser);
// Enable the debug operations.
$this
->drupalGet('admin/lingotek/settings');
$this
->drupalPostForm(NULL, [], t('Enable debug operations'));
// Go to the bulk config management page.
$this
->goToConfigBulkManagementForm('node_fields');
// We need to ensure the profile is stored.
$edit = [
'table[node.article.body]' => TRUE,
$this
->getBulkOperationFormName() => 'change_profile:manual',
];
$this
->drupalPostForm(NULL, $edit, $this
->getApplyActionsButtonLabel());
$edit = [
'table[node.article.body]' => TRUE,
$this
->getBulkOperationFormName() => 'debug.export',
];
$this
->drupalPostForm(NULL, $edit, $this
->getApplyActionsButtonLabel());
$this
->assertText('Exports available');
// Download the file.
$this
->clickLink('config.node.article.body.json');
$response = json_decode($this
->getSession()
->getPage()
->getContent(), TRUE);
$this
->assertIdentical('Body', $response['field.field.node.article.body']['label']);
$this
->assertIdentical('', $response['field.field.node.article.body']['description']);
$this
->assertIdentical('node.article.body (config): Body', $response['_debug']['title']);
$this
->assertIdentical('manual', $response['_debug']['profile']);
$this
->assertIdentical('en_US', $response['_debug']['source_locale']);
}