Exemplo n.º 1
0
 public function __construct()
 {
     // Drupal 6 has no core queue capabilities, and thus requires contrib.
     if (!module_exists('drupal_queue')) {
         throw new QueueException(dt('The drupal_queue module need to be installed/enabled.'));
     } else {
         drupal_queue_include();
     }
 }
Exemplo n.º 2
0
 /**
  * Sets up modules for API tests, and saves the default branch for teardown.
  */
 function baseSetUp()
 {
     // This is restored in the tearDown() function.
     $this->default_branch = variable_get('api_default_branch', NULL);
     variable_del('api_default_branch');
     DrupalWebTestCase::setUp('drupal_queue', 'grammar_parser', 'ctools', 'api');
     include_once drupal_get_path('module', 'api') . '/api.admin.inc';
     include_once drupal_get_path('module', 'api') . '/parser.inc';
     drupal_queue_include();
     // Set up a super-user.
     $this->super_user = $this->drupalCreateUser(array('access API reference', 'administer API reference', 'access content', 'access administration pages', 'administer blocks', 'administer nodes'));
     $this->drupalLogin($this->super_user);
 }