Skip to content
Snippets Groups Projects
Commit c39e9dc1 authored by catch's avatar catch
Browse files

Revert "Issue #3082211 by quietone, Pooja Ganjage, danflanagan8, Spokje,...

Revert "Issue #3082211 by quietone, Pooja Ganjage, danflanagan8, Spokje, benjifisher, Wim Leers, mikelutz: Migrate UI tests should provide the complete log message on failure"

This reverts commit d60a3f99.
parent 64049344
No related branches found
No related tags found
19 merge requests!8357Issue #2994000 by Lendude, Pasqualle, quietone, pameeela: Notice in logs when...,!4488Issue #3376281: Random machine names no longer need to be wrapped in strtolower(),!3149Issue #3282285: Email "" does not comply with addr-spec of RFC 2822,!3000Issue #793660: Check for failure of hook_install,!2940Issue #3320240: Entity count query returns a string instead of int,!2937Issue #3315245: Order of languages overrides default language fallback,!2877Issue #3056652 by yogeshmpawar, mashermike, aalin, ranjith_kumar_k_u: Link...,!2804URL of image field formatter use absolute URL option.,!2749Issue #3309024: Focus on the wrong submit button after AJAX submit,!2692Issue #3284010 by _shY, mherchel, Abhijith S: "Create content" link within...,!2608Issue #2430379 by quietone, znerol, larowlan: Add explicit test for session...,!2575Issue #3198340 by alexpott, xjm, cilefen, Mile23, mmjvb, catch, longwave, mfb,...,!2555Issue #3277148 by rpayanm, andregp, joachim, Farnoosh, Athrylith, Jingting:...,!2554Issue #3277148 by rpayanm, andregp, joachim, Farnoosh, Athrylith, Jingting:...,!2539Issue #3299806 by BenStallings: Include uuid field in d7_node migration, if present.,!1627Issue #3082958: Add gitignore(s) to composer-ready project templates,!1014Issue #3226806: Move filter implementations from filter.module to plugin classes,!939Issue #2971209: Allow the MediaLibraryUiBuilder service to use an alternative view display,!88Issue #3163299: Ajax exposed filters not working for multiple instances of the same Views block placed on one page
......@@ -2,7 +2,6 @@
namespace Drupal\Tests\migrate_drupal_ui\Functional;
use Drupal\Core\Logger\RfcLogLevel;
use Drupal\Tests\migrate_drupal\Traits\CreateTestContentEntitiesTrait;
/**
......@@ -12,27 +11,6 @@ abstract class MigrateUpgradeExecuteTestBase extends MigrateUpgradeTestBase {
use CreateTestContentEntitiesTrait;
/**
* Indicates if the watchdog logs should be output.
*
* @var bool
*/
protected $outputLogs = FALSE;
/**
* The admin username after the migration.
*
* @var string
*/
protected $migratedAdminUserName = 'admin';
/**
* The number of expected logged errors of type migrate_drupal_ui.
*
* @var string
*/
protected $expectedLoggedErrors = 0;
/**
* {@inheritdoc}
*/
......@@ -44,17 +22,6 @@ protected function setUp() {
}
/**
* {@inheritdoc}
*/
protected function tearDown(): void {
if ($this->outputLogs) {
$this->outputLogs($this->migratedAdminUserName);
$this->assertLogError();
}
parent::tearDown();
}
/**
* Executes an upgrade and then an incremental upgrade.
*/
......@@ -103,36 +70,4 @@ public function useTestMailCollector() {
$this->writeSettings($settings);
}
/**
* Asserts log errors.
*/
public function assertLogError() {
$db = \Drupal::service('database');
$num_errors = $db->select('watchdog', 'w')
->fields('w')
->condition('type', 'migrate_drupal_ui')
->condition('severity', RfcLogLevel::ERROR)
->countQuery()
->execute()
->fetchField();
$this->assertSame($this->expectedLoggedErrors, (int) $num_errors);
}
/**
* Preserve the logs pages.
*/
public function outputLogs($username) {
// Ensure user 1 is accessing the admin log. Change the username because
// the migration changes the username of user 1 but not the password.
if (\Drupal::currentUser()->id() != 1) {
$this->rootUser->name = $username;
$this->drupalLogin($this->rootUser);
}
$this->drupalGet('/admin/reports/dblog');
while ($next_link = $this->getSession()->getPage()->findLink('Next page')) {
$next_link->click();
}
}
}
......@@ -54,11 +54,6 @@ protected function setUp(): void {
$this->loadFixture($this->getModulePath('migrate_drupal') . '/tests/fixtures/drupal6.php');
// Enable saving the logs and set the post migration admin user name.
$this->outputLogs = TRUE;
$this->migratedAdminUserName = 'root';
$this->expectedLoggedErrors = 36;
// @todo Remove this in https://www.drupal.org/node/3267515
\Drupal::service('module_installer')->uninstall(['rdf']);
}
......@@ -210,10 +205,6 @@ public function testUpgradeAndIncremental() {
$this->assertFollowUpMigrationResults();
$this->assertEmailsSent();
// Save logs and check the error count.
$this->outputLogs('root');
$this->assertLogError();
}
/**
......
......@@ -45,9 +45,6 @@ class Upgrade7Test extends MigrateUpgradeExecuteTestBase {
protected function setUp(): void {
parent::setUp();
// Install the Drupal 6 and Drupal 7 administration theme.
\Drupal::service('theme_installer')->install(['seven']);
// @todo remove in https://www.drupal.org/project/drupal/issues/3267040
// Delete the existing content made to test the ID Conflict form. Migrations
// are to be done on a site without content. The test of the ID Conflict
......@@ -60,11 +57,6 @@ protected function setUp(): void {
$this->loadFixture($this->getModulePath('migrate_drupal') . '/tests/fixtures/drupal7.php');
// Enable saving the logs and set the post migration admin user name.
$this->outputLogs = TRUE;
$this->migratedAdminUserName = 'admin';
$this->expectedLoggedErrors = 25;
// @todo Remove this in https://www.drupal.org/node/3267515
\Drupal::service('module_installer')->uninstall(['rdf']);
}
......@@ -81,7 +73,7 @@ protected function getSourceBasePath() {
*/
protected function getEntityCounts() {
return [
'block' => 43,
'block' => 27,
'block_content' => 1,
'block_content_type' => 1,
'comment' => 4,
......@@ -242,10 +234,6 @@ public function testUpgradeAndIncremental() {
$this->assertFollowUpMigrationResults();
$this->assertEmailsSent();
// Save logs and check the error count.
$this->outputLogs('admin');
$this->assertLogError();
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment