Révision 6ff32cea
Ajouté par Florent Torregrosa il y a environ 9 ans
drupal7/modules/simpletest/tests/system_test.module | ||
---|---|---|
78 | 78 |
'type' => MENU_CALLBACK, |
79 | 79 |
); |
80 | 80 |
|
81 |
$items['system-test/drupal-set-message'] = array( |
|
82 |
'title' => 'Set messages with drupal_set_message()', |
|
83 |
'page callback' => 'system_test_drupal_set_message', |
|
84 |
'access callback' => TRUE, |
|
85 |
'type' => MENU_CALLBACK, |
|
86 |
); |
|
87 |
|
|
81 | 88 |
$items['system-test/main-content-handling'] = array( |
82 | 89 |
'title' => 'Test main content handling', |
83 | 90 |
'page callback' => 'system_test_main_content_fallback', |
... | ... | |
435 | 442 |
drupal_goto($authorize_url); |
436 | 443 |
} |
437 | 444 |
|
445 |
/** |
|
446 |
* Sets two messages and removes the first one before the messages are displayed. |
|
447 |
*/ |
|
448 |
function system_test_drupal_set_message() { |
|
449 |
// Set two messages. |
|
450 |
drupal_set_message('First message (removed).'); |
|
451 |
drupal_set_message('Second message (not removed).'); |
|
452 |
|
|
453 |
// Remove the first. |
|
454 |
unset($_SESSION['messages']['status'][0]); |
|
455 |
|
|
456 |
return ''; |
|
457 |
} |
|
458 |
|
|
438 | 459 |
/** |
439 | 460 |
* Page callback to print out $_GET['destination'] for testing. |
440 | 461 |
*/ |
Formats disponibles : Unified diff
Update core to 7.36