public function DatabaseLegacyTest::testDbFieldSetNoDefault in Drupal 8
Tests deprecation of the db_field_set_no_default() function.
@expectedDeprecation db_field_set_no_default() is deprecated in drupal:8.0.0. It will be removed from drupal:9.0.0. Instead, get a database connection injected into your service from the container, get its schema driver, and call changeField() on it, passing a full field specification. For example, $injected_database->schema()->changeField($table, $field, $field_new, $spec, $keys_new). See https://www.drupal.org/node/2993033 @expectedDeprecation fieldSetNoDefault() is deprecated in drupal:8.7.0 and will be removed before drupal:9.0.0. Instead, call ::changeField() passing a full field specification. See https://www.drupal.org/node/2999035 @doesNotPerformAssertions
File
- core/
tests/ Drupal/ KernelTests/ Core/ Database/ DatabaseLegacyTest.php, line 154
Class
- DatabaseLegacyTest
- Deprecation tests cases for the database layer.
Namespace
Drupal\KernelTests\Core\DatabaseCode
public function testDbFieldSetNoDefault() {
db_field_set_no_default('test_null', 'age');
}