Commit ba5c5b50 authored by Alex Pott's avatar Alex Pott Committed by Bálint Csuthy
Browse files

Issue #3276947 by alexpott: Fix tests on 2.0.x branch

parent ebcdc119
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -72,8 +72,8 @@ class ConfigUpdateTest extends BrowserTestBase {

    // Load the Drush include file so that its functions can be tested, plus
    // the Drush testing include file.
    module_load_include('inc', 'config_update_ui', 'config_update_ui.drush_testing');
    module_load_include('inc', 'config_update_ui', 'config_update_ui.drush');
    \Drupal::moduleHandler()->loadInclude('config_update_ui', 'inc', 'config_update_ui.drush_testing');
    \Drupal::moduleHandler()->loadInclude('config_update_ui', 'inc', 'config_update_ui.drush');
  }

  /**
@@ -217,7 +217,7 @@ class ConfigUpdateTest extends BrowserTestBase {

    // Test the export link.
    $this->drupalGet('admin/config/development/configuration/report/type/search_page');
    $this->clickLink('Export');
    $this->clickLink('Export', 1);
    $session = $this->assertSession();
    $session->pageTextContains('Here is your configuration:');
    $session->pageTextContains('id: node_search');
@@ -296,7 +296,7 @@ class ConfigUpdateTest extends BrowserTestBase {
    $this->assertDrushReports('type', 'search_page', [], array_keys($added), [], []);

    // Test the export link.
    $this->clickLink('Export');
    $this->clickLink('Export', 1);
    $session = $this->assertSession();
    $session->pageTextContains('Here is your configuration:');
    $session->pageTextContains('id: test');
@@ -320,7 +320,8 @@ class ConfigUpdateTest extends BrowserTestBase {

    // Change the search module config and verify the actions work for
    // simple config.
    $this->drupalPostForm('admin/config/search/pages', [
    $this->drupalGet('admin/config/search/pages');
    $this->submitForm([
      'minimum_word_size' => 4,
    ], 'Save configuration');
    $changed = ['search.settings' => 'search.settings'];
@@ -334,7 +335,7 @@ class ConfigUpdateTest extends BrowserTestBase {
    $session->pageTextContains('4');

    $this->drupalGet('admin/config/development/configuration/report/module/search');
    $this->clickLink('Export');
    $this->clickLink('Export', 1);
    $session = $this->assertSession();
    $session->pageTextContains('minimum_word_size: 4');
    // Grab the hash line for the next test.
+3 −2
Original line number Diff line number Diff line
@@ -343,8 +343,9 @@ abstract class ConfigUpdateUnitTestBase extends UnitTestCase {
   *
   * For \Symfony\Component\EventDispatcher\EventDispatchInterface::dispatch().
   */
  public function mockDispatch($name, Event $event = NULL) {
    $this->dispatchedEvents[] = [$event, $name];
  public function mockDispatch(Event $event, $name = NULL) {
    $this->dispatchedEvents[] = [$name, $event];
    return $event;
  }

  /**