public function LingotekNodeBulkDebugTest::testDebugOptionsDisplay in Lingotek Translation 8
Tests that a node can be translated using the links on the management page.
File
- src/
Tests/ LingotekNodeBulkDebugTest.php, line 64
Class
- LingotekNodeBulkDebugTest
- Tests debugging a node using the bulk management form.
Namespace
Drupal\lingotek\TestsCode
public function testDebugOptionsDisplay() {
// Login as admin.
$this
->drupalLogin($this->rootUser);
$this
->goToContentBulkManagementForm();
// There is no 'debug' option group.
$this
->assertFalse($this
->xpath('//select[@id=:id]//optgroup[@label=:label]', array(
':id' => 'edit-operation',
':label' => 'debug',
)), 'There is no debug group.');
// Enable the debug operations.
$this
->drupalGet('admin/lingotek/settings');
$this
->drupalPostForm(NULL, [], t('Enable debug operations'));
// Back to the bulk node management page.
$this
->goToContentBulkManagementForm();
// There should be a 'debug' option group with the right operation.
$this
->assertTrue($this
->xpath('//select[@id=:id]//optgroup[@label=:label]', array(
':id' => 'edit-operation',
':label' => 'debug',
)), 'There is a debug group.');
$this
->assertTrue($this
->xpath('//select[@id=:id]//option[@value=:value]', array(
':id' => 'edit-operation',
':value' => 'debug.export',
)), 'There is a debug export option.');
}