Same name in other branches
- 5.0.x advagg_validator/tests/src/Kernel/Form/CssW3FormTest.php \Drupal\Tests\advagg_validator\Kernel\Form\CssW3FormTest
- 6.0.x advagg_validator/tests/src/Kernel/Form/CssW3FormTest.php \Drupal\Tests\advagg_validator\Kernel\Form\CssW3FormTest
Tests the validator css W3 settings form.
@group advagg
Hierarchy
- class \Drupal\Tests\advagg_validator\Kernel\Form\CssW3FormTest extends \Drupal\KernelTests\KernelTestBase
Expanded class hierarchy of CssW3FormTest
File
-
advagg_validator/
tests/ src/ Kernel/ Form/ CssW3FormTest.php, line 14
Namespace
Drupal\Tests\advagg_validator\Kernel\FormView source
class CssW3FormTest extends KernelTestBase {
/**
* The validator css W3 settings form object under test.
*
* @var \Drupal\advagg_validator\Form\CssW3Form
*/
protected $cssW3Form;
/**
* Modules to enable.
*
* @var array
*/
protected static $modules = [];
/**
* {@inheritdoc}
*
* @covers ::__construct
*/
protected function setUp() {
parent::setUp();
$this->installConfig(static::$modules);
$this->cssW3Form = CssW3Form::create($this->container);
}
/**
* Tests for \Drupal\advagg_validator\Form\CssW3Form.
*/
public function testSettingsForm() {
$this->assertInstanceOf(FormInterface::class, $this->cssW3Form);
$id = $this->cssW3Form
->getFormId();
$this->assertEquals('advagg_validator_cssw3', $id);
$method = new \ReflectionMethod(CssW3Form::class, 'getEditableConfigNames');
$method->setAccessible(TRUE);
$name = $method->invoke($this->cssW3Form);
$this->assertEquals([
'advagg_validator.settings',
], $name);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
CssW3FormTest::$cssW3Form | protected | property | The validator css W3 settings form object under test. |
CssW3FormTest::$modules | protected static | property | Modules to enable. |
CssW3FormTest::setUp | protected | function | @covers ::__construct |
CssW3FormTest::testSettingsForm | public | function | Tests for \Drupal\advagg_validator\Form\CssW3Form. |