class TextareaTest

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

Tests the form API textarea element.

@group Form

Hierarchy

Expanded class hierarchy of TextareaTest

File

core/modules/system/tests/src/Functional/Form/TextareaTest.php, line 14

Namespace

Drupal\Tests\system\Functional\Form
View source
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'));
    }

}

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