Verified Commit 28b82f67 authored by Dave Long's avatar Dave Long
Browse files

Issue #3449214 by alexpott, nicxvan: A revert has cause cspell to fail due to the word yarhar

parent ca4e4a81
Loading
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
 * @file
 */

// cspell:ignore divpiggydiv yarhar timecurrent timetime
// cspell:ignore divpiggydiv timecurrent timetime

namespace Drupal\big_pipe_test;

@@ -171,7 +171,7 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf
        '#markup' => BigPipeMarkup::create('<hello'),
        '#attached' => [
          'placeholders' => [
            '<hello' => ['#lazy_builder' => ['\Drupal\big_pipe_test\BigPipeTestController::helloOrYarhar', []]],
            '<hello' => ['#lazy_builder' => ['\Drupal\big_pipe_test\BigPipeTestController::helloOrHi', []]],
          ],
        ],
      ],
@@ -181,7 +181,7 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf
          // We specifically test an invalid callback here. We need to let
          // PHPStan ignore it.
          // @phpstan-ignore-next-line
          'hello_or_yarhar',
          'hello_or_hi',
          [],
        ],
      ]
@@ -196,7 +196,7 @@ public static function cases(ContainerInterface $container = NULL, AccountInterf
        ],
      ],
    ];
    $hello->embeddedHtmlResponse = '<marquee>Yarhar llamas forever!</marquee>';
    $hello->embeddedHtmlResponse = '<marquee>Llamas forever!</marquee>';

    // 5. Edge case: non-#lazy_builder placeholder that calls Fiber::suspend().
    $piggy = new BigPipePlaceholderTestCase(
+5 −7
Original line number Diff line number Diff line
@@ -6,8 +6,6 @@
use Drupal\big_pipe_test\EventSubscriber\BigPipeTestSubscriber;
use Drupal\Core\Security\TrustedCallbackInterface;

// cspell:ignore yarhar

/**
 * Returns responses for Big Pipe routes.
 */
@@ -109,7 +107,7 @@ public function placeholderPreview() {
        '#type' => 'container',
        '#attributes' => ['id' => 'placeholder-render-array-container'],
        'user_links' => [
          '#lazy_builder' => [static::class . '::helloOrYarhar', []],
          '#lazy_builder' => [static::class . '::helloOrHi', []],
          '#create_placeholder' => TRUE,
          '#lazy_builder_preview' => [
            '#attributes' => ['id' => 'render-array-preview'],
@@ -154,13 +152,13 @@ public static function piggy(): array {
  }

  /**
   * #lazy_builder callback; says "hello" or "yarhar".
   * #lazy_builder callback; says "hello" or "hi".
   *
   * @return array
   */
  public static function helloOrYarhar() {
  public static function helloOrHi() {
    return [
      '#markup' => BigPipeMarkup::create('<marquee>Yarhar llamas forever!</marquee>'),
      '#markup' => BigPipeMarkup::create('<marquee>llamas forever!</marquee>'),
      '#cache' => [
        'max-age' => 0,
        'tags' => ['cache_tag_set_in_lazy_builder'],
@@ -219,7 +217,7 @@ public static function counter() {
   * {@inheritdoc}
   */
  public static function trustedCallbacks() {
    return ['currentTime', 'piggy', 'helloOrYarhar', 'exception', 'responseException', 'counter'];
    return ['currentTime', 'piggy', 'helloOrHi', 'exception', 'responseException', 'counter'];
  }

}
+2 −4
Original line number Diff line number Diff line
@@ -6,8 +6,6 @@

use Drupal\FunctionalJavascriptTests\WebDriverTestBase;

// cspell:ignore yarhar

/**
 * Tests placeholder preview functionality.
 *
@@ -50,7 +48,7 @@ public function testLazyLoaderPreview() {

    $this->assertSession()->pageTextContains('There is a lamb and there is a puppy');
    $this->assertSession()->elementTextEquals('css', '#placeholder-render-array-container [data-big-pipe-placeholder-id] > #render-array-preview', 'There is a lamb and there is a puppy');
    $this->assertSession()->elementTextNotContains('css', '#placeholder-render-array-container', 'Yarhar llamas forever!');
    $this->assertSession()->elementTextNotContains('css', '#placeholder-render-array-container', 'Llamas forever!');

    // Uninstall big_pipe_bypass_js.
    \Drupal::service('module_installer')->uninstall(['big_pipe_bypass_js']);
@@ -60,7 +58,7 @@ public function testLazyLoaderPreview() {
    $this->assertSession()->elementTextContains('css', '#placeholder-preview-twig-container', $display_name);
    $this->assertSession()->pageTextNotContains('LOOK AT ME I AM CONSUMING SPACE FOR LATER');

    $this->assertSession()->elementTextContains('css', '#placeholder-render-array-container marquee', 'Yarhar llamas forever!');
    $this->assertSession()->elementTextContains('css', '#placeholder-render-array-container marquee', 'Llamas forever!');
    $this->assertSession()->pageTextNotContains('There is a lamb and there is a puppy');
  }

+1 −1
Original line number Diff line number Diff line
@@ -329,7 +329,7 @@ public function testAjaxFocus() {

    // Test textfield with 'change' event listener with refocus-blur set to
    // FALSE.
    $textfield2->setValue('Llamas say yarhar');
    $textfield2->setValue('Llamas say hi');
    $textfield3->focus();
    $this->assertSession()->assertWaitOnAjaxRequest();
    $has_focus_id = $this->getSession()->evaluateScript('document.activeElement.id');
+2 −4
Original line number Diff line number Diff line
@@ -8,8 +8,6 @@
use Drupal\Core\Asset\AttachedAssets;
use Drupal\KernelTests\KernelTestBase;

// cspell:ignore yarhar

/**
 * Tests #attached assets: attached asset libraries and JavaScript settings.
 *
@@ -200,7 +198,7 @@ public function testSettings() {
    $build = [];
    $build['#attached']['library'][] = 'core/drupalSettings';
    // Nonsensical value to verify if it's possible to override path settings.
    $build['#attached']['drupalSettings']['path']['pathPrefix'] = 'yarhar';
    $build['#attached']['drupalSettings']['path']['pathPrefix'] = 'does_not_exist';
    $assets = AttachedAssets::createFromRenderArray($build);

    $js = $this->assetResolver->getJsAssets($assets, FALSE, \Drupal::languageManager()->getCurrentLanguage())[1];
@@ -220,7 +218,7 @@ public function testSettings() {

    // Test whether the settings for core/drupalSettings are available.
    $this->assertTrue(isset($parsed_settings['path']['baseUrl']), 'drupalSettings.path.baseUrl is present.');
    $this->assertSame('yarhar', $parsed_settings['path']['pathPrefix'], 'drupalSettings.path.pathPrefix is present and has the correct (overridden) value.');
    $this->assertSame('does_not_exist', $parsed_settings['path']['pathPrefix'], 'drupalSettings.path.pathPrefix is present and has the correct (overridden) value.');
    $this->assertSame('', $parsed_settings['path']['currentPath'], 'drupalSettings.path.currentPath is present and has the correct value.');
    $this->assertFalse($parsed_settings['path']['currentPathIsAdmin'], 'drupalSettings.path.currentPathIsAdmin is present and has the correct value.');
    $this->assertFalse($parsed_settings['path']['isFront'], 'drupalSettings.path.isFront is present and has the correct value.');