public function LingotekSystemSiteBulkDebugTest::testDebugExport in Lingotek Translation 8
File
- src/Tests/LingotekSystemSiteBulkDebugTest.php, line 62
Class
- LingotekSystemSiteBulkDebugTest
- Tests debugging a config object using the bulk management form.
Namespace
Drupal\lingotek\Tests
Code
public function testDebugExport() {
$this
->drupalLogin($this->rootUser);
$this
->drupalGet('admin/lingotek/settings');
$this
->drupalPostForm(NULL, [], t('Enable debug operations'));
$this
->goToConfigBulkManagementForm();
$edit = [
'table[system.site_information_settings]' => TRUE,
'operation' => 'debug.export',
];
$this
->drupalPostForm(NULL, $edit, t('Execute'));
$this
->assertText('Exports available');
$this
->clickLink('config.system.site_information_settings.json');
$response = json_decode($this->content, true);
$this
->assertIdentical('Drupal', $response['system.site']['name']);
$this
->assertIdentical('', $response['system.site']['slogan']);
$this
->assertIdentical('system.site_information_settings (config): System information', $response['_debug']['title']);
$this
->assertIdentical('<null>', $response['_debug']['profile']);
$this
->assertIdentical('en_US', $response['_debug']['source_locale']);
}