Révision b0dc3a2e
Ajouté par Julien Enselme il y a plus de 7 ans
drupal7/modules/update/update.test | ||
---|---|---|
462 | 462 |
$this->assertRaw(l(t('Update test base theme'), 'http://example.com/project/update_test_basetheme'), 'Link to the Update test base theme project appears.'); |
463 | 463 |
} |
464 | 464 |
|
465 |
/** |
|
466 |
* Tests that the admin theme is always notified about security updates. |
|
467 |
*/ |
|
468 |
function testUpdateAdminThemeSecurityUpdate() { |
|
469 |
// Disable the admin theme. |
|
470 |
db_update('system') |
|
471 |
->fields(array('status' => 0)) |
|
472 |
->condition('type', 'theme') |
|
473 |
->condition('name', 'update_test_%', 'LIKE') |
|
474 |
->execute(); |
|
475 |
|
|
476 |
variable_set('admin_theme', 'update_test_admintheme'); |
|
477 |
|
|
478 |
// Define the initial state for core and the themes. |
|
479 |
$system_info = array( |
|
480 |
'#all' => array( |
|
481 |
'version' => '7.0', |
|
482 |
), |
|
483 |
'update_test_admintheme' => array( |
|
484 |
'project' => 'update_test_admintheme', |
|
485 |
'version' => '7.x-1.0', |
|
486 |
'hidden' => FALSE, |
|
487 |
), |
|
488 |
'update_test_basetheme' => array( |
|
489 |
'project' => 'update_test_basetheme', |
|
490 |
'version' => '7.x-1.1', |
|
491 |
'hidden' => FALSE, |
|
492 |
), |
|
493 |
'update_test_subtheme' => array( |
|
494 |
'project' => 'update_test_subtheme', |
|
495 |
'version' => '7.x-1.0', |
|
496 |
'hidden' => FALSE, |
|
497 |
), |
|
498 |
); |
|
499 |
variable_set('update_test_system_info', $system_info); |
|
500 |
variable_set('update_check_disabled', FALSE); |
|
501 |
$xml_mapping = array( |
|
502 |
// This is enough because we don't check the update status of the admin |
|
503 |
// theme. We want to check that the admin theme is included in the list. |
|
504 |
'drupal' => '0', |
|
505 |
); |
|
506 |
$this->refreshUpdateStatus($xml_mapping); |
|
507 |
// The admin theme is displayed even if it's disabled. |
|
508 |
$this->assertText('update_test_admintheme', "The admin theme is checked for update even if it's disabled"); |
|
509 |
// The other disabled themes are not displayed. |
|
510 |
$this->assertNoText('update_test_basetheme', 'Disabled theme is not checked for update in the list.'); |
|
511 |
$this->assertNoText('update_test_subtheme', 'Disabled theme is not checked for update in the list.'); |
|
512 |
} |
|
513 |
|
|
465 | 514 |
/** |
466 | 515 |
* Tests that disabled themes are only shown when desired. |
467 | 516 |
*/ |
... | ... | |
800 | 849 |
$this->assertEqual($url, $expected, "When ? is present, '$url' should be '$expected'."); |
801 | 850 |
|
802 | 851 |
} |
803 |
} |
|
852 |
} |
Formats disponibles : Unified diff
Update to Drupal 7.52