/[drupal]/drupal/modules/simpletest/tests/module.test
ViewVC logotype

Diff of /drupal/modules/simpletest/tests/module.test

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.15 by webchick, Wed Nov 11 06:48:28 2009 UTC revision 1.16 by dries, Wed Nov 18 20:00:31 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: module.test,v 1.14 2009/09/29 18:08:28 webchick Exp $  // $Id: module.test,v 1.15 2009/11/11 06:48:28 webchick Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 87  class ModuleUnitTest extends DrupalWebTe Line 87  class ModuleUnitTest extends DrupalWebTe
87     */     */
88    function testModuleImplements() {    function testModuleImplements() {
89      // Clear the cache.      // Clear the cache.
90      cache_clear_all('module_implements', 'cache');      cache_clear_all('module_implements', 'cache_bootstrap');
91      $this->assertFalse(cache_get('module_implements'), t('The module implements cache is empty.'));      $this->assertFalse(cache_get('module_implements', 'cache_bootstrap'), t('The module implements cache is empty.'));
92      $this->drupalGet('');      $this->drupalGet('');
93      $this->assertTrue(cache_get('module_implements'), t('The module implements cache is populated after requesting a page.'));      $this->assertTrue(cache_get('module_implements', 'cache_bootstrap'), t('The module implements cache is populated after requesting a page.'));
94    
95      // Test again with an authenticated user.      // Test again with an authenticated user.
96      $this->user = $this->drupalCreateUser();      $this->user = $this->drupalCreateUser();
97      $this->drupalLogin($this->user);      $this->drupalLogin($this->user);
98      cache_clear_all('module_implements', 'cache');      cache_clear_all('module_implements', 'cache_bootstrap');
99      $this->drupalGet('');      $this->drupalGet('');
100      $this->assertTrue(cache_get('module_implements'), t('The module implements cache is populated after requesting a page.'));      $this->assertTrue(cache_get('module_implements', 'cache_bootstrap'), t('The module implements cache is populated after requesting a page.'));
101    }    }
102  }  }
103    

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.3