1 update.test | UpdateTestContribCase::testNoReleasesAvailable() |
Tests when there is no available release data for a contrib module.
File
- core/
modules/ update/ tests/ update.test, line 273 - This file contains tests for the Update Manager module.
Class
Code
function testNoReleasesAvailable() {
$system_info = array(
'#all' => array(
'version' => '1.0',
),
'aaa_update_test' => array(
'project' => 'aaa_update_test',
'version' => '1.x-1.0',
'hidden' => FALSE,
),
);
state_set('update_test_system_info', $system_info);
$this->refreshUpdateStatus(array('backdrop' => '0', 'aaa_update_test' => 'no-releases'));
$this->backdropGet('admin/reports/updates');
// Cannot use $this->assertStandardTests() because we need to check for the
// 'No available releases found' string.
$this->assertRaw('<h3>' . t('Backdrop CMS') . '</h3>');
$this->assertRaw(l(t('Backdrop CMS'), 'http://example.com/project/backdrop'));
$this->assertText(t('Up to date'));
$this->assertRaw('<h3>' . t('Modules') . '</h3>');
$this->assertNoText(t('Update available'));
$this->assertText(t('No available releases found'));
$this->assertNoRaw(l(t('AAA Update test'), 'http://example.com/project/aaa_update_test'));
}