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