// Log in as an administrator who can see the administrative theme.
$admin_user =
$this->
drupalCreateUser(['view the administration theme'
]);
$this->
drupalLogin($admin_user);
// Visit an administrative page that runs a test batch, and check that the
// theme that was used during batch execution (which the batch callback
// function saved as a variable) matches the theme used on the
// administrative page.
$this->
drupalGet('admin/batch-test/test-theme'
);
// The stack should contain the name of the theme used on the progress
// page.
$this->
assertEquals(['claro'
],
batch_test_stack(), 'A progressive batch correctly uses the theme of the page that started the batch.'
);
} /**
* Tests that the batch API progress page shows the title correctly.
*/
public function testBatchProgressPageTitle() { // Visit an administrative page that runs a test batch, and check that the
// title shown during batch execution (which the batch callback function
// saved as a variable) matches the theme used on the administrative page.
// Run initial step only first.
$this->maximumMetaRefreshCount = 0;