TextareaTest.php

Same filename in this branch
  1. 11.x core/tests/Drupal/Tests/Core/Render/Element/TextareaTest.php
Same filename and directory in other branches
  1. 9 core/tests/Drupal/Tests/Core/Render/Element/TextareaTest.php
  2. 8.9.x core/tests/Drupal/Tests/Core/Render/Element/TextareaTest.php
  3. 10 core/tests/Drupal/Tests/Core/Render/Element/TextareaTest.php

Namespace

Drupal\Tests\system\Functional\Form

File

core/modules/system/tests/src/Functional/Form/TextareaTest.php

View source
<?php

declare (strict_types=1);
namespace Drupal\Tests\system\Functional\Form;

use Drupal\Tests\BrowserTestBase;

/**
 * Tests the form API textarea element.
 *
 * @group Form
 */
class TextareaTest extends BrowserTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected static $modules = [
    'form_test',
  ];
  
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  
  /**
   * Tests the textarea element #resizable property.
   */
  public function testFormTextareaResizable() : void {
    $this->drupalGet('form-test/textarea');
    $this->assertNotEmpty($this->cssSelect('#edit-textarea-resizable-vertical.resize-vertical'));
    $this->assertNotEmpty($this->cssSelect('#edit-textarea-resizable-horizontal.resize-horizontal'));
    $this->assertNotEmpty($this->cssSelect('#edit-textarea-resizable-both.resize-both'));
    $this->assertNotEmpty($this->cssSelect('#edit-textarea-resizable-none.resize-none'));
  }

}

Classes

Title Deprecated Summary
TextareaTest Tests the form API textarea element.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.