Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / system / tests / src / Functional / Form / ElementsContainerTest.php
1 <?php
2
3 namespace Drupal\Tests\system\Functional\Form;
4
5 use Drupal\Tests\BrowserTestBase;
6
7 /**
8  * Tests the container form element for expected behavior.
9  *
10  * @group Form
11  */
12 class ElementsContainerTest extends BrowserTestBase {
13
14   /**
15    * Modules to enable.
16    *
17    * @var array
18    */
19   public static $modules = ['form_test'];
20
21   /**
22    * Tests the #optional container property.
23    */
24   public function testOptionalContainerElements() {
25     $this->drupalGet('form-test/optional-container');
26     $assertSession = $this->assertSession();
27     $assertSession->elementNotExists('css', 'div.empty_optional');
28     $assertSession->elementExists('css', 'div.empty_nonoptional');
29     $assertSession->elementExists('css', 'div.nonempty_optional');
30     $assertSession->elementExists('css', 'div.nonempty_nonoptional');
31   }
32
33 }