Error message

You are browsing documentation for drupal 7.x, which is not supported anymore. Read the updated version of this page for drupal 11.x (the latest version).

function UpdateTestContribCase::testUpdateContribBasic

Tests the basic functionality of a contrib module on the status report.

File

modules/update/update.test, line 329

Class

UpdateTestContribCase
Tests behavior related to handling updates to contributed modules and themes.

Code

function testUpdateContribBasic() {
 $system_info = array(
 '#all' => array(
 'version' => '7.0',
 ),
 'aaa_update_test' => array(
 'project' => 'aaa_update_test',
 'version' => '7.x-1.0',
 'hidden' => FALSE,
 ),
 );
 variable_set ('update_test_system_info', $system_info);
 $this->refreshUpdateStatus (array(
 'drupal' => '0',
 'aaa_update_test' => '1_0',
 ));
 $this->standardTests ();
 $this->assertText (t ('Up to date'));
 $this->assertRaw ('<h3>' . t ('Modules') . '</h3>');
 $this->assertNoText (t ('Update available'));
 $this->assertRaw (l (t ('AAA Update test'), 'http://example.com/project/aaa_update_test'), 'Link to aaa_update_test project appears.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.