getFullQualifiedTableName example

public function messageTableName() {
    return $this->messageTableName;
  }

  /** * Get the fully qualified map table name. * * @return string * The fully qualified map table name. */
  public function getQualifiedMapTableName() {
    return $this->getDatabase()->getFullQualifiedTableName($this->mapTableName);
  }

  /** * Gets the database connection. * * @return \Drupal\Core\Database\Connection * The database connection object. */
  public function getDatabase() {
    $this->init();
    return $this->database;
  }
->countQuery()
      ->execute()
      ->fetchField();
    $this->assertSame('1', $num_matches, 'Found 1 record.');
  }

  /** * Tests \Drupal\Core\Database\Connection::getFullQualifiedTableName(). */
  public function testGetFullQualifiedTableName() {
    $database = \Drupal::database();
    $num_matches = $database->select($database->getFullQualifiedTableName('test'), 't')
      ->countQuery()
      ->execute()
      ->fetchField();
    $this->assertSame('4', $num_matches, 'Found 4 records.');
  }

}
Home | Imprint | This part of the site doesn't use cookies.