Loading core/modules/system/tests/fixtures/update/drupal-10.3.0.bare.standard.php.gz 0 → 100644 +159 KiB File added.Preview size limit exceeded, changes collapsed. View file core/modules/system/tests/fixtures/update/drupal-10.3.0.filled.standard.php.gz 0 → 100644 +583 KiB File added.Preview size limit exceeded, changes collapsed. View file core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php +4 −24 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ use Drupal\FunctionalTests\Update\UpdatePathTestBase; use Drupal\node\Entity\Node; use Drupal\node\Entity\NodeType; use Drupal\user\Entity\User; // cspell:ignore hola usuario Loading @@ -28,7 +27,7 @@ class UpdatePathTestBaseFilledTest extends UpdatePathTestBase { * {@inheritdoc} */ protected function setDatabaseDumpFiles() { $this->databaseDumpFiles[] = __DIR__ . '/../../../../tests/fixtures/update/drupal-9.4.0.filled.standard.php.gz'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../tests/fixtures/update/drupal-10.3.0.filled.standard.php.gz'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../tests/fixtures/update/drupal-8.update-test-schema-enabled.php'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../tests/fixtures/update/drupal-8.update-test-semver-update-n-enabled.php'; } Loading @@ -45,7 +44,6 @@ public function testUpdatedSite() { $expected_node_data = [ [1, 'article', 'en', 'Test Article - New title'], [2, 'book', 'en', 'Book page'], [4, 'page', 'en', 'Test page'], [8, 'test_content_type', 'en', 'Test title'], ]; Loading Loading @@ -85,7 +83,7 @@ public function testUpdatedSite() { $this->assertSession()->pageTextNotContains('Test 12'); // Make sure all other field labels are there. for ($i = 1; $i <= 23; $i++) { if ($i != 12) { if (($i != 11) && ($i != 12)) { $this->assertSession()->pageTextContains('Test ' . $i); } } Loading Loading @@ -123,7 +121,6 @@ public function testUpdatedSite() { $this->assertSession()->pageTextContains('Test Article - New title'); $this->assertSession()->pageTextContains('test.txt'); $this->assertSession()->pageTextContains('druplicon.small'); $this->assertSession()->responseContains('General discussion'); $this->assertSession()->pageTextContains('Test Article - New title'); $this->assertSession()->pageTextContains('Test 1'); $this->assertSession()->responseContains('0.01'); Loading Loading @@ -153,8 +150,8 @@ public function testUpdatedSite() { $this->drupalGet('admin/structure/views/view/test_view'); $this->assertSession()->pageTextContains('Test view'); // Make sure the book node exists. $this->drupalGet('admin/structure/book'); // Make sure the node/1 node exists. $this->drupalGet('node/1'); $this->clickLink('Test Article - New title'); $this->assertSession()->pageTextContains('Body'); $this->assertSession()->pageTextContains('Tags'); Loading Loading @@ -183,7 +180,6 @@ public function testUpdatedSite() { $this->drupalGet('admin/structure/block/manage/testblock'); $this->assertSession()->checkboxNotChecked('edit-visibility-language-langcodes-es'); $this->assertSession()->checkboxChecked('edit-visibility-language-langcodes-en'); $this->assertSession()->checkboxNotChecked('edit-visibility-entity-bundlenode-bundles-book'); $this->assertSession()->checkboxChecked('edit-visibility-entity-bundlenode-bundles-test-content-type'); // Make sure our block is still translated. Loading Loading @@ -302,13 +298,6 @@ public function testUpdatedSite() { // cSpell:disable-next-line $this->assertSession()->pageTextContains('Comentario completo'); // Make sure our custom action is still there. $this->drupalGet('admin/config/system/actions'); $this->assertSession()->pageTextContains('Test action'); $this->drupalGet('admin/config/system/actions/configure/test_action'); $this->assertSession()->fieldValueEquals('id', 'test_action'); $this->assertSession()->responseContains('drupal.org'); // Make sure our ban still exists. $this->drupalGet('admin/config/people/ban'); $this->assertSession()->pageTextContains('8.8.8.8'); Loading Loading @@ -338,12 +327,10 @@ public function testUpdatedSite() { // Make sure our modules are still enabled. $expected_enabled_modules = [ 'action', 'ban', 'basic_auth', 'block', 'block_content', 'book', 'breakpoint', 'ckeditor5', 'comment', Loading Loading @@ -384,7 +371,6 @@ public function testUpdatedSite() { 'telephone', 'text', 'toolbar', 'tracker', 'update', 'user', 'views_ui', Loading @@ -405,12 +391,6 @@ public function testUpdatedSite() { foreach ($expected_enabled_themes as $theme) { $this->assertTrue($this->container->get('theme_handler')->themeExists($theme), 'The "' . $theme . '" is still enabled.'); } // Ensure that the Book module's node type does not have duplicated enforced // dependencies. // @see system_post_update_fix_enforced_dependencies() $book_node_type = NodeType::load('book'); $this->assertEquals(['enforced' => ['module' => ['book']]], $book_node_type->get('dependencies')); } /** Loading core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php +3 −3 Original line number Diff line number Diff line Loading @@ -56,11 +56,11 @@ abstract class UpdatePathTestBase extends BrowserTestBase { /** * The file path(s) to the dumped database(s) to load into the child site. * * The file system/tests/fixtures/update/drupal-9.4.0.bare.standard.php.gz is * The file system/tests/fixtures/update/drupal-10.3.0.bare.standard.php.gz is * normally included first -- this sets up the base database from a bare * standard Drupal installation. * * The file system/tests/fixtures/update/drupal-9.4.0.filled.standard.php.gz * The file system/tests/fixtures/update/drupal-10.3.0.filled.standard.php.gz * can also be used in case we want to test with a database filled with * content, and with all core modules enabled. * Loading Loading @@ -253,7 +253,7 @@ protected function testDatabaseLoaded() { /** @var \Drupal\Core\Update\UpdateHookRegistry $update_registry */ $update_registry = \Drupal::service('update.update_hook_registry'); foreach (['user' => 9301, 'node' => 8700, 'system' => 8901, 'update_test_schema' => 8000] as $module => $schema) { foreach (['user' => 10000, 'node' => 8700, 'system' => 10201, 'update_test_schema' => 8000] as $module => $schema) { $this->assertEquals($schema, $update_registry->getInstalledVersion($module), "Module $module schema is $schema"); } Loading core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ class UpdatePathTestBaseTest extends UpdatePathTestBase { * {@inheritdoc} */ protected function setDatabaseDumpFiles() { $this->databaseDumpFiles[] = __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-9.4.0.bare.standard.php.gz'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-10.3.0.bare.standard.php.gz'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-8.update-test-schema-enabled.php'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-8.update-test-semver-update-n-enabled.php'; } Loading Loading
core/modules/system/tests/fixtures/update/drupal-10.3.0.bare.standard.php.gz 0 → 100644 +159 KiB File added.Preview size limit exceeded, changes collapsed. View file
core/modules/system/tests/fixtures/update/drupal-10.3.0.filled.standard.php.gz 0 → 100644 +583 KiB File added.Preview size limit exceeded, changes collapsed. View file
core/modules/system/tests/src/Functional/UpdateSystem/UpdatePathTestBaseFilledTest.php +4 −24 Original line number Diff line number Diff line Loading @@ -6,7 +6,6 @@ use Drupal\FunctionalTests\Update\UpdatePathTestBase; use Drupal\node\Entity\Node; use Drupal\node\Entity\NodeType; use Drupal\user\Entity\User; // cspell:ignore hola usuario Loading @@ -28,7 +27,7 @@ class UpdatePathTestBaseFilledTest extends UpdatePathTestBase { * {@inheritdoc} */ protected function setDatabaseDumpFiles() { $this->databaseDumpFiles[] = __DIR__ . '/../../../../tests/fixtures/update/drupal-9.4.0.filled.standard.php.gz'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../tests/fixtures/update/drupal-10.3.0.filled.standard.php.gz'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../tests/fixtures/update/drupal-8.update-test-schema-enabled.php'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../tests/fixtures/update/drupal-8.update-test-semver-update-n-enabled.php'; } Loading @@ -45,7 +44,6 @@ public function testUpdatedSite() { $expected_node_data = [ [1, 'article', 'en', 'Test Article - New title'], [2, 'book', 'en', 'Book page'], [4, 'page', 'en', 'Test page'], [8, 'test_content_type', 'en', 'Test title'], ]; Loading Loading @@ -85,7 +83,7 @@ public function testUpdatedSite() { $this->assertSession()->pageTextNotContains('Test 12'); // Make sure all other field labels are there. for ($i = 1; $i <= 23; $i++) { if ($i != 12) { if (($i != 11) && ($i != 12)) { $this->assertSession()->pageTextContains('Test ' . $i); } } Loading Loading @@ -123,7 +121,6 @@ public function testUpdatedSite() { $this->assertSession()->pageTextContains('Test Article - New title'); $this->assertSession()->pageTextContains('test.txt'); $this->assertSession()->pageTextContains('druplicon.small'); $this->assertSession()->responseContains('General discussion'); $this->assertSession()->pageTextContains('Test Article - New title'); $this->assertSession()->pageTextContains('Test 1'); $this->assertSession()->responseContains('0.01'); Loading Loading @@ -153,8 +150,8 @@ public function testUpdatedSite() { $this->drupalGet('admin/structure/views/view/test_view'); $this->assertSession()->pageTextContains('Test view'); // Make sure the book node exists. $this->drupalGet('admin/structure/book'); // Make sure the node/1 node exists. $this->drupalGet('node/1'); $this->clickLink('Test Article - New title'); $this->assertSession()->pageTextContains('Body'); $this->assertSession()->pageTextContains('Tags'); Loading Loading @@ -183,7 +180,6 @@ public function testUpdatedSite() { $this->drupalGet('admin/structure/block/manage/testblock'); $this->assertSession()->checkboxNotChecked('edit-visibility-language-langcodes-es'); $this->assertSession()->checkboxChecked('edit-visibility-language-langcodes-en'); $this->assertSession()->checkboxNotChecked('edit-visibility-entity-bundlenode-bundles-book'); $this->assertSession()->checkboxChecked('edit-visibility-entity-bundlenode-bundles-test-content-type'); // Make sure our block is still translated. Loading Loading @@ -302,13 +298,6 @@ public function testUpdatedSite() { // cSpell:disable-next-line $this->assertSession()->pageTextContains('Comentario completo'); // Make sure our custom action is still there. $this->drupalGet('admin/config/system/actions'); $this->assertSession()->pageTextContains('Test action'); $this->drupalGet('admin/config/system/actions/configure/test_action'); $this->assertSession()->fieldValueEquals('id', 'test_action'); $this->assertSession()->responseContains('drupal.org'); // Make sure our ban still exists. $this->drupalGet('admin/config/people/ban'); $this->assertSession()->pageTextContains('8.8.8.8'); Loading Loading @@ -338,12 +327,10 @@ public function testUpdatedSite() { // Make sure our modules are still enabled. $expected_enabled_modules = [ 'action', 'ban', 'basic_auth', 'block', 'block_content', 'book', 'breakpoint', 'ckeditor5', 'comment', Loading Loading @@ -384,7 +371,6 @@ public function testUpdatedSite() { 'telephone', 'text', 'toolbar', 'tracker', 'update', 'user', 'views_ui', Loading @@ -405,12 +391,6 @@ public function testUpdatedSite() { foreach ($expected_enabled_themes as $theme) { $this->assertTrue($this->container->get('theme_handler')->themeExists($theme), 'The "' . $theme . '" is still enabled.'); } // Ensure that the Book module's node type does not have duplicated enforced // dependencies. // @see system_post_update_fix_enforced_dependencies() $book_node_type = NodeType::load('book'); $this->assertEquals(['enforced' => ['module' => ['book']]], $book_node_type->get('dependencies')); } /** Loading
core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBase.php +3 −3 Original line number Diff line number Diff line Loading @@ -56,11 +56,11 @@ abstract class UpdatePathTestBase extends BrowserTestBase { /** * The file path(s) to the dumped database(s) to load into the child site. * * The file system/tests/fixtures/update/drupal-9.4.0.bare.standard.php.gz is * The file system/tests/fixtures/update/drupal-10.3.0.bare.standard.php.gz is * normally included first -- this sets up the base database from a bare * standard Drupal installation. * * The file system/tests/fixtures/update/drupal-9.4.0.filled.standard.php.gz * The file system/tests/fixtures/update/drupal-10.3.0.filled.standard.php.gz * can also be used in case we want to test with a database filled with * content, and with all core modules enabled. * Loading Loading @@ -253,7 +253,7 @@ protected function testDatabaseLoaded() { /** @var \Drupal\Core\Update\UpdateHookRegistry $update_registry */ $update_registry = \Drupal::service('update.update_hook_registry'); foreach (['user' => 9301, 'node' => 8700, 'system' => 8901, 'update_test_schema' => 8000] as $module => $schema) { foreach (['user' => 10000, 'node' => 8700, 'system' => 10201, 'update_test_schema' => 8000] as $module => $schema) { $this->assertEquals($schema, $update_registry->getInstalledVersion($module), "Module $module schema is $schema"); } Loading
core/tests/Drupal/FunctionalTests/Update/UpdatePathTestBaseTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ class UpdatePathTestBaseTest extends UpdatePathTestBase { * {@inheritdoc} */ protected function setDatabaseDumpFiles() { $this->databaseDumpFiles[] = __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-9.4.0.bare.standard.php.gz'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-10.3.0.bare.standard.php.gz'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-8.update-test-schema-enabled.php'; $this->databaseDumpFiles[] = __DIR__ . '/../../../../modules/system/tests/fixtures/update/drupal-8.update-test-semver-update-n-enabled.php'; } Loading