1 system.test | UpdateScriptFunctionalTest::testNoUpdateFunctionality() |
Tests update.php when there are no updates to apply.
File
- core/
modules/ system/ tests/ system.test, line 2256 - Tests for system.module.
Class
- UpdateScriptFunctionalTest
- Tests for the update system functionality.
Code
function testNoUpdateFunctionality() {
// Click through update.php with 'administer software updates' permission.
$this->backdropLogin($this->update_user);
$this->backdropPost($this->update_url, array(), t('Continue'), array('external' => TRUE));
$this->assertText(t('No pending updates.'));
$this->assertNoLink('Administration pages');
$this->clickLink('Home page');
$this->assertResponse(200);
// Click through update.php with 'access administration pages' permission.
$admin_user = $this->backdropCreateUser(array('administer software updates', 'access administration pages'));
$this->backdropLogin($admin_user);
$this->backdropPost($this->update_url, array(), t('Continue'), array('external' => TRUE));
$this->assertText(t('No pending updates.'));
$this->clickLink('Administration pages');
$this->assertResponse(200);
}