X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fsystem%2Fsrc%2FTests%2FUpdate%2FFieldSchemaDataUninstallUpdateTest.php;fp=web%2Fcore%2Fmodules%2Fsystem%2Fsrc%2FTests%2FUpdate%2FFieldSchemaDataUninstallUpdateTest.php;h=0000000000000000000000000000000000000000;hp=6c5d2f2448ca3e9ae6319f453293c48a68098e38;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/system/src/Tests/Update/FieldSchemaDataUninstallUpdateTest.php b/web/core/modules/system/src/Tests/Update/FieldSchemaDataUninstallUpdateTest.php deleted file mode 100644 index 6c5d2f244..000000000 --- a/web/core/modules/system/src/Tests/Update/FieldSchemaDataUninstallUpdateTest.php +++ /dev/null @@ -1,59 +0,0 @@ -databaseDumpFiles = [ - __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz', - __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.block-content-uninstall.php', - __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.field-schema-data-uninstall-2573667.php', - ]; - } - - /** - * Tests the upgrade path after fixing field schema data uninstallation. - */ - public function testUpdateHookN() { - $this->assertFieldSchemaData(TRUE, 'Field schema data to be purged found before update.'); - $this->runUpdates(); - $this->assertFieldSchemaData(FALSE, 'No field schema data to be purged found after update.'); - } - - /** - * Asserts that field schema data to be purged is found. - * - * @param bool $found - * Whether field schema data is expected to be found or not. - * @param string $message - * The assert message. - * - * @return bool - * TRUE if the assertion succeeded, FALSE otherwise. - */ - 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); - } - -}