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