Unverified Commit c9820e0e authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3410128 by quietone, longwave, nikolay shapovalov, smustgrave: Remove...

Issue #3410128 by quietone, longwave, nikolay shapovalov, smustgrave: Remove remaining unnecessary uses of t() in tests

(cherry picked from commit 4d7ce2a6)
parent b5a06149
Loading
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -63327,18 +63327,6 @@
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Block/BlockBaseTest.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Block\\\\BlockManagerTest\\:\\:formatPlural\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Block/BlockManagerTest.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Block\\\\BlockManagerTest\\:\\:getNumberOfPlurals\\(\\) has no return type specified\\.$#',
	'count' => 1,
	'path' => __DIR__ . '/tests/Drupal/Tests/Core/Block/BlockManagerTest.php',
];
$ignoreErrors[] = [
	// identifier: missingType.return
	'message' => '#^Method Drupal\\\\Tests\\\\Core\\\\Cache\\\\CacheCollectorHelper\\:\\:set\\(\\) has no return type specified\\.$#',
+1 −1
Original line number Diff line number Diff line
@@ -24,7 +24,7 @@ trait BlockCreationTrait {
   *   example:
   *   @code
   *     $this->drupalPlaceBlock('system_powered_by_block', [
   *       'label' => t('Hello, world!'),
   *       'label' => 'Hello, world!',
   *     ]);
   *   @endcode
   *   The following defaults are provided:
+2 −3
Original line number Diff line number Diff line
@@ -180,12 +180,11 @@ public function testListing(): void {
    // Create test block for other user tests.
    $test_block = $this->createBlockContent($label);

    $link_text = t('Add content block');
    // Test as a user with view only permissions.
    $this->drupalLogin($this->baseUser1);
    $this->drupalGet('admin/content/block');
    $this->assertSession()->statusCodeEquals(200);
    $this->assertSession()->linkNotExists($link_text);
    $this->assertSession()->linkNotExists('Add content block');
    $this->assertSession()->linkByHrefNotExists('admin/content/block/' . $test_block->id());
    $this->assertSession()->linkByHrefNotExists('admin/content/block/' . $test_block->id() . '/delete');

@@ -195,7 +194,7 @@ public function testListing(): void {
    $this->drupalLogin($this->baseUser2);
    $this->drupalGet('admin/content/block');
    $this->assertSession()->statusCodeEquals(200);
    $this->assertSession()->linkExists($link_text);
    $this->assertSession()->linkExists('Add content block');
    $this->assertSession()->linkByHrefExists('admin/content/block/' . $test_block->id());
    $this->assertSession()->linkByHrefExists('admin/content/block/' . $test_block->id() . '/delete');
  }
+2 −3
Original line number Diff line number Diff line
@@ -175,12 +175,11 @@ public function testListing(): void {
    // Create test block for other user tests.
    $test_block = $this->createBlockContent($label);

    $link_text = t('Add content block');
    // Test as a user with view only permissions.
    $this->drupalLogin($this->baseUser1);
    $this->drupalGet('admin/content/block');
    $this->assertSession()->statusCodeEquals(200);
    $this->assertSession()->linkNotExists($link_text);
    $this->assertSession()->linkNotExists('Add content block');
    $matches = $this->xpath('//td[1]');
    $actual = $matches[0]->getText();
    $this->assertEquals($label, $actual, 'Label found for test block.');
@@ -194,7 +193,7 @@ public function testListing(): void {
    $this->drupalLogin($this->baseUser2);
    $this->drupalGet('admin/content/block');
    $this->assertSession()->statusCodeEquals(200);
    $this->assertSession()->linkExists($link_text);
    $this->assertSession()->linkExists('Add content block');
    $matches = $this->xpath('//td/a');
    $actual = $matches[0]->getText();
    $this->assertEquals($label, $actual, 'Label found for test block.');
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ public function testOperationLinks(): void {
    // The admin user does have the "administer block" permission.
    $this->assertEquals([
      'block-edit' => [
        'title' => $this->t('Edit block'),
        'title' => 'Edit block',
        'url' => $block_content->toUrl('edit-form')->setOptions([]),
        'weight' => 50,
      ],
Loading