class UpdateSchemaTest
Same name in this branch
- 9 core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php \Drupal\Tests\system\Functional\UpdateSystem\UpdateSchemaTest
Same name and namespace in other branches
- 11.x core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php \Drupal\Tests\system\Functional\UpdateSystem\UpdateSchemaTest
- 11.x core/tests/Drupal/KernelTests/Core/Extension/UpdateSchemaTest.php \Drupal\KernelTests\Core\Extension\UpdateSchemaTest
- 10 core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php \Drupal\Tests\system\Functional\UpdateSystem\UpdateSchemaTest
- 10 core/tests/Drupal/KernelTests/Core/Extension/UpdateSchemaTest.php \Drupal\KernelTests\Core\Extension\UpdateSchemaTest
- 8.9.x core/modules/system/tests/src/Functional/UpdateSystem/UpdateSchemaTest.php \Drupal\Tests\system\Functional\UpdateSystem\UpdateSchemaTest
Tests for schema and update includes.
@group Core
Hierarchy
- class \Drupal\KernelTests\KernelTestBase implements \Drupal\Core\DependencyInjection\ServiceProviderInterface uses \Drupal\KernelTests\AssertLegacyTrait, \Drupal\KernelTests\AssertContentTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\ExtensionListTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait extends \PHPUnit\Framework\TestCase
- class \Drupal\KernelTests\Core\Extension\UpdateSchemaTest extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of UpdateSchemaTest
File
-
core/
tests/ Drupal/ KernelTests/ Core/ Extension/ UpdateSchemaTest.php, line 12
Namespace
Drupal\KernelTests\Core\ExtensionView source
class UpdateSchemaTest extends KernelTestBase {
/**
* {@inheritdoc}
*/
protected static $modules = [
'update_test_schema',
];
/**
* Tests the function parses schema updates as integer numbers.
*
* @see \Drupal\Core\Update\UpdateHookRegistry::getAvailableUpdates()
*/
public function testDrupalGetSchemaVersionsInt() {
\Drupal::state()->set('update_test_schema_version', 8001);
$this->installSchema('update_test_schema', [
'update_test_schema_table',
]);
$schema = \Drupal::service('update.update_hook_registry')->getAvailableUpdates('update_test_schema');
foreach ($schema as $version) {
$this->assertIsInt($version);
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.