Projet

Général

Profil

Révision b4adf10d

Ajouté par Assos Assos il y a plus de 9 ans

Udpate to 7.33

Voir les différences:

drupal7/modules/system/system.test
556 556
    $this->drupalPost(NULL, NULL, t('Uninstall'));
557 557
    $this->assertText(t('The selected modules have been uninstalled.'), 'Modules status has been updated.');
558 558
  }
559

  
560
  /**
561
   * Tests whether the correct module metadata is returned.
562
   */
563
  function testModuleMetaData() {
564
    // Generate the list of available modules.
565
    $modules = system_rebuild_module_data();
566
    // Check that the mtime field exists for the system module.
567
    $this->assertTrue(!empty($modules['system']->info['mtime']), 'The system.info file modification time field is present.');
568
    // Use 0 if mtime isn't present, to avoid an array index notice.
569
    $test_mtime = !empty($modules['system']->info['mtime']) ? $modules['system']->info['mtime'] : 0;
570
    // Ensure the mtime field contains a number that is greater than zero.
571
    $this->assertTrue(is_numeric($test_mtime) && ($test_mtime > 0), 'The system.info file modification time field contains a timestamp.');
572
  }
573

  
574
  /**
575
   * Tests whether the correct theme metadata is returned.
576
   */
577
  function testThemeMetaData() {
578
    // Generate the list of available themes.
579
    $themes = system_rebuild_theme_data();
580
    // Check that the mtime field exists for the bartik theme.
581
    $this->assertTrue(!empty($themes['bartik']->info['mtime']), 'The bartik.info file modification time field is present.');
582
    // Use 0 if mtime isn't present, to avoid an array index notice.
583
    $test_mtime = !empty($themes['bartik']->info['mtime']) ? $themes['bartik']->info['mtime'] : 0;
584
    // Ensure the mtime field contains a number that is greater than zero.
585
    $this->assertTrue(is_numeric($test_mtime) && ($test_mtime > 0), 'The bartik.info file modification time field contains a timestamp.');
586
  }
559 587
}
560 588

  
561 589
/**

Formats disponibles : Unified diff