function InstallTest::testGetSchemaAtInstallTime

Same name and namespace in other branches
  1. 9 core/modules/system/tests/src/Functional/Module/InstallTest.php \Drupal\Tests\system\Functional\Module\InstallTest::testGetSchemaAtInstallTime()
  2. 10 core/modules/system/tests/src/Kernel/Module/InstallTest.php \Drupal\Tests\system\Kernel\Module\InstallTest::testGetSchemaAtInstallTime()
  3. 11.x core/modules/system/tests/src/Kernel/Module/InstallTest.php \Drupal\Tests\system\Kernel\Module\InstallTest::testGetSchemaAtInstallTime()

Verify that drupal_get_schema() can be used during module installation.

File

core/modules/system/tests/src/Functional/Module/InstallTest.php, line 32

Class

InstallTest
Tests the installation of modules.

Namespace

Drupal\Tests\system\Functional\Module

Code

public function testGetSchemaAtInstallTime() {
  // @see module_test_install()
  $value = Database::getConnection()->select('module_test', 'mt')
    ->fields('mt', [
    'data',
  ])
    ->execute()
    ->fetchField();
  $this->assertIdentical($value, 'varchar');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.