Projet

Général

Profil

Révision 01dfd3b5

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

Udpate to 7.77

Voir les différences:

drupal7/modules/system/system.test
28 28
   *   specified base table. Defaults to TRUE.
29 29
   */
30 30
  function assertTableCount($base_table, $count = TRUE) {
31
    $tables = db_find_tables(Database::getConnection()->prefixTables('{' . $base_table . '}') . '%');
31
    $tables = db_find_tables_d8($base_table . '%');
32 32

  
33 33
    if ($count) {
34 34
      return $this->assertTrue($tables, format_string('Tables matching "@base_table" found.', array('@base_table' => $base_table)));
......
779 779
    $submit_ip = $_SERVER['REMOTE_ADDR'] = '192.168.1.1';
780 780
    system_block_ip_action();
781 781
    system_block_ip_action();
782
    $ip_count = db_query("SELECT iid from {blocked_ips} WHERE ip = :ip", array(':ip' => $submit_ip))->rowCount();
782
    $ip_count = db_query("SELECT COUNT(*) from {blocked_ips} WHERE ip = :ip", array(':ip' => $submit_ip))->fetchColumn();
783 783
    $this->assertEqual('1', $ip_count);
784 784
    drupal_static_reset('ip_address');
785 785
    $submit_ip = $_SERVER['REMOTE_ADDR'] = ' ';
786 786
    system_block_ip_action();
787 787
    system_block_ip_action();
788 788
    system_block_ip_action();
789
    $ip_count = db_query("SELECT iid from {blocked_ips} WHERE ip = :ip", array(':ip' => $submit_ip))->rowCount();
789
    $ip_count = db_query("SELECT COUNT(*) from {blocked_ips} WHERE ip = :ip", array(':ip' => $submit_ip))->fetchColumn();
790 790
    $this->assertEqual('1', $ip_count);
791 791
  }
792 792
}

Formats disponibles : Unified diff