Unverified Commit 8c1678f2 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3123068 by longwave: Fix 'Drupal.Semantics.FunctionT.ConcatString' coding standard

(cherry picked from commit 0955fd04)
parent ede02041
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -81,12 +81,13 @@ public function getConfig(Editor $editor) {
   * {@inheritdoc}
   */
  public function getButtons() {
    $label = $this->t('Language');
    return [
      'Language' => [
        'label' => $this->t('Language'),
        'label' => $label,
        'image_alternative' => [
          '#type' => 'inline_template',
          '#template' => '<a href="#" class="cke-icon-only" role="button" title="' . $this->t('Language') . '" aria-label="' . $this->t('Language') . '"><span class="cke_button_icon cke_button__language_icon">' . $this->t('Language') . '</span></a>',
          '#template' => '<a href="#" class="cke-icon-only" role="button" title="' . $label . '" aria-label="' . $label . '"><span class="cke_button_icon cke_button__language_icon">' . $label . '</span></a>',
        ],
      ],
    ];
+1 −1
Original line number Diff line number Diff line
@@ -90,7 +90,7 @@ public function testTableSortDefaultSort() {

    // Verify that the header links are built properly.
    $assert->linkByHrefExists('database_test/tablesort_default_sort');
    $assert->responseMatches('/\<a.*title\=\"' . t('sort by Username') . '\".*\>/');
    $assert->responseMatches('/\<a.*title\=\"sort by Username\".*\>/');
  }

}
+3 −3
Original line number Diff line number Diff line
@@ -88,7 +88,7 @@ public function testUserLoginBlock() {
    $this->assertEqual('MISS', $this->drupalGetHeader(DynamicPageCacheSubscriber::HEADER));
    $this->drupalPostForm(NULL, $edit, t('Log in'));
    $this->assertNoText(t('User login'), 'Logged in.');
    $this->assertPattern('!<title.*?' . t('Compose tips') . '.*?</title>!', 'Still on the same page after login for allowed page');
    $this->assertPattern('!<title.*?Compose tips.*?</title>!', 'Still on the same page after login for allowed page');

    // Log out again and repeat with a non-403 page including query arguments.
    $this->drupalLogout();
@@ -96,7 +96,7 @@ public function testUserLoginBlock() {
    $this->assertEqual('HIT', $this->drupalGetHeader(DynamicPageCacheSubscriber::HEADER));
    $this->drupalPostForm(NULL, $edit, t('Log in'));
    $this->assertNoText(t('User login'), 'Logged in.');
    $this->assertPattern('!<title.*?' . t('Compose tips') . '.*?</title>!', 'Still on the same page after login for allowed page');
    $this->assertPattern('!<title.*?Compose tips.*?</title>!', 'Still on the same page after login for allowed page');
    $this->assertStringContainsString('/filter/tips?foo=bar', $this->getUrl(), 'Correct query arguments are displayed after login');

    // Repeat with different query arguments.
@@ -105,7 +105,7 @@ public function testUserLoginBlock() {
    $this->assertEqual('HIT', $this->drupalGetHeader(DynamicPageCacheSubscriber::HEADER));
    $this->drupalPostForm(NULL, $edit, t('Log in'));
    $this->assertNoText(t('User login'), 'Logged in.');
    $this->assertPattern('!<title.*?' . t('Compose tips') . '.*?</title>!', 'Still on the same page after login for allowed page');
    $this->assertPattern('!<title.*?Compose tips.*?</title>!', 'Still on the same page after login for allowed page');
    $this->assertStringContainsString('/filter/tips?foo=baz', $this->getUrl(), 'Correct query arguments are displayed after login');

    // Check that the user login block is not vulnerable to information
+1 −1
Original line number Diff line number Diff line
@@ -49,7 +49,7 @@ public function testChangedField() {

    $this->drupalGet($path, $options);

    $this->assertText(t('Updated date') . ': ' . date('Y-m-d', REQUEST_TIME));
    $this->assertText('Updated date: ' . date('Y-m-d', REQUEST_TIME));
  }

}
+0 −1
Original line number Diff line number Diff line
@@ -122,7 +122,6 @@
  <rule ref="Drupal.Semantics.FunctionAlias"/>
  <rule ref="Drupal.Semantics.FunctionT">
    <exclude name="Drupal.Semantics.FunctionT.NotLiteralString"/>
    <exclude name="Drupal.Semantics.FunctionT.ConcatString"/>
  </rule>
  <rule ref="Drupal.Semantics.FunctionWatchdog"/>
  <rule ref="Drupal.Semantics.InstallHooks"/>