Revision 582db59d
Added by Assos Assos almost 9 years ago
drupal7/modules/system/system.test | ||
---|---|---|
389 | 389 |
); |
390 | 390 |
} |
391 | 391 |
|
392 |
/** |
|
393 |
* Checks functionality of project namespaces for dependencies. |
|
394 |
*/ |
|
395 |
function testProjectNamespaceForDependencies() { |
|
396 |
// Enable module with project namespace to ensure nothing breaks. |
|
397 |
$edit = array( |
|
398 |
'modules[Testing][system_project_namespace_test][enable]' => TRUE, |
|
399 |
); |
|
400 |
$this->drupalPost('admin/modules', $edit, t('Save configuration')); |
|
401 |
$this->assertModules(array('system_project_namespace_test'), TRUE); |
|
402 |
} |
|
403 |
|
|
392 | 404 |
/** |
393 | 405 |
* Attempt to enable translation module without locale enabled. |
394 | 406 |
*/ |
... | ... | |
911 | 923 |
} |
912 | 924 |
|
913 | 925 |
function setUp() { |
914 |
parent::setUp(array('common_test', 'common_test_cron_helper')); |
|
926 |
parent::setUp(array('common_test', 'common_test_cron_helper', 'cron_queue_test'));
|
|
915 | 927 |
} |
916 | 928 |
|
917 | 929 |
/** |
... | ... | |
931 | 943 |
$this->assertEqual($queue->numberOfItems(), 1, 'Failing item still in the queue after throwing an exception.'); |
932 | 944 |
} |
933 | 945 |
|
946 |
/** |
|
947 |
* Tests worker defined as a class method callable. |
|
948 |
*/ |
|
949 |
function testCallable() { |
|
950 |
$queue = DrupalQueue::get('cron_queue_test_callback'); |
|
951 |
|
|
952 |
// Enqueue an item for processing. |
|
953 |
$queue->createItem(array($this->randomName() => $this->randomName())); |
|
954 |
|
|
955 |
// Run cron; the worker should perform the task and delete the item from the |
|
956 |
// queue. |
|
957 |
$this->cronRun(); |
|
958 |
|
|
959 |
// The queue should be empty. |
|
960 |
$this->assertEqual($queue->numberOfItems(), 0); |
|
961 |
} |
|
962 |
|
|
934 | 963 |
} |
935 | 964 |
|
936 | 965 |
class AdminMetaTagTestCase extends DrupalWebTestCase { |
Also available in: Unified diff
Update Drupal core to version 7.40