
| Current Path : /var/www/html/dataninja.cn/core/modules/system/tests/src/Functional/Form/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/dataninja.cn/core/modules/system/tests/src/Functional/Form/ElementsContainerTest.php |
<?php
namespace Drupal\Tests\system\Functional\Form;
use Drupal\Tests\BrowserTestBase;
/**
* Tests the container form element for expected behavior.
*
* @group Form
*/
class ElementsContainerTest extends BrowserTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = ['form_test'];
/**
* Tests the #optional container property.
*/
public function testOptionalContainerElements() {
$this->drupalGet('form-test/optional-container');
$assertSession = $this->assertSession();
$assertSession->elementNotExists('css', 'div.empty_optional');
$assertSession->elementExists('css', 'div.empty_nonoptional');
$assertSession->elementExists('css', 'div.nonempty_optional');
$assertSession->elementExists('css', 'div.nonempty_nonoptional');
}
}