JsHintFormTest.php in Advanced CSS/JS Aggregation 8.4
File
advagg_validator/tests/src/Kernel/Form/JsHintFormTest.php
View source
<?php
namespace Drupal\Tests\advagg_validator\Kernel\Form;
use Drupal\Core\Form\FormInterface;
use Drupal\KernelTests\KernelTestBase;
use Drupal\advagg_validator\Form\JsHintForm;
class JsHintFormTest extends KernelTestBase {
protected $jsHintForm;
protected static $modules = [];
protected function setUp() {
parent::setUp();
$this
->installConfig(static::$modules);
$this->jsHintForm = JsHintForm::create($this->container);
}
public function testSettingsForm() {
$this
->assertInstanceOf(FormInterface::class, $this->jsHintForm);
$id = $this->jsHintForm
->getFormId();
$this
->assertEquals('advagg_validator_jshint', $id);
$method = new \ReflectionMethod(JsHintForm::class, 'getEditableConfigNames');
$method
->setAccessible(TRUE);
$name = $method
->invoke($this->jsHintForm);
$this
->assertEquals([
'advagg_validator.settings',
], $name);
}
}