protected function FieldSchemaDataUninstallUpdateTest::assertFieldSchemaData in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/src/Tests/Update/FieldSchemaDataUninstallUpdateTest.php \Drupal\system\Tests\Update\FieldSchemaDataUninstallUpdateTest::assertFieldSchemaData()
Asserts that field schema data to be purged is found.
Parameters
bool $found: Whether field schema data is expected to be found or not.
string $message: The assert message.
Return value
bool TRUE if the assertion succeeded, FALSE otherwise.
1 call to FieldSchemaDataUninstallUpdateTest::assertFieldSchemaData()
- FieldSchemaDataUninstallUpdateTest::testUpdateHookN in core/
modules/ system/ src/ Tests/ Update/ FieldSchemaDataUninstallUpdateTest.php - Tests the upgrade path after fixing field schema data uninstallation.
File
- core/
modules/ system/ src/ Tests/ Update/ FieldSchemaDataUninstallUpdateTest.php, line 50 - Contains \Drupal\system\Tests\Update\FieldSchemaDataUninstallUpdateTest.
Class
- FieldSchemaDataUninstallUpdateTest
- Tests the upgrade path after fixing field schema data uninstallation.
Namespace
Drupal\system\Tests\UpdateCode
protected function assertFieldSchemaData($found, $message) {
$query = \Drupal::database()
->select('key_value', 'kv')
->fields('kv');
$query
->condition('kv.collection', 'entity.storage_schema.sql')
->condition('kv.name', 'block_content.field_schema_data.%', 'LIKE');
$items = $query
->execute()
->fetchAll();
return $this
->assertEqual((bool) $items, $found, $message);
}