InfoFormTest.php in Advanced CSS/JS Aggregation 8.4
File
tests/src/Kernel/Form/InfoFormTest.php
View source
<?php
namespace Drupal\Tests\advagg\Kernel\Form;
use Drupal\Core\Form\FormInterface;
use Drupal\KernelTests\KernelTestBase;
use Drupal\advagg\Form\InfoForm;
class InfoFormTest extends KernelTestBase {
protected $infoForm;
protected static $modules = [
'system',
'advagg',
];
protected function setUp() {
parent::setUp();
$this
->installConfig(static::$modules);
$this->infoForm = InfoForm::create($this->container);
}
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);
}
}