Same name in other branches
  1. 6.0.x advagg_validator/tests/src/Kernel/Form/CssLintFormTest.php \Drupal\Tests\advagg_validator\Kernel\Form\CssLintFormTest
  2. 8.x-4.x advagg_validator/tests/src/Kernel/Form/CssLintFormTest.php \Drupal\Tests\advagg_validator\Kernel\Form\CssLintFormTest

Tests the Modifier Minification settings form.

@group advagg

Hierarchy

  • class \Drupal\Tests\advagg_validator\Kernel\Form\CssLintFormTest extends \Drupal\KernelTests\KernelTestBase

Expanded class hierarchy of CssLintFormTest

File

advagg_validator/tests/src/Kernel/Form/CssLintFormTest.php, line 14

Namespace

Drupal\Tests\advagg_validator\Kernel\Form
View source
class CssLintFormTest extends KernelTestBase {
    
    /**
     * The Modifier Minification settings form object under test.
     *
     * @var \Drupal\advagg_validator\Form\CssLintForm
     */
    protected $cssLintForm;
    
    /**
     * Modules to enable.
     *
     * @var array
     */
    protected static $modules = [];
    
    /**
     * {@inheritdoc}
     *
     * @covers ::__construct
     */
    protected function setUp() {
        parent::setUp();
        $this->installConfig(static::$modules);
        $this->cssLintForm = CssLintForm::create($this->container);
    }
    
    /**
     * Tests for \Drupal\advagg_validator\Form\CssLintForm.
     */
    public function testSettingsForm() {
        $this->assertInstanceOf(FormInterface::class, $this->cssLintForm);
        $id = $this->cssLintForm
            ->getFormId();
        $this->assertEquals('advagg_validator_csslint', $id);
        $method = new \ReflectionMethod(CssLintForm::class, 'getEditableConfigNames');
        $method->setAccessible(TRUE);
        $name = $method->invoke($this->cssLintForm);
        $this->assertEquals([
            'advagg_validator.settings',
        ], $name);
    }

}

Members

Title Sort descending Modifiers Object type Summary
CssLintFormTest::$cssLintForm protected property The Modifier Minification settings form object under test.
CssLintFormTest::$modules protected static property Modules to enable.
CssLintFormTest::setUp protected function @covers ::__construct
CssLintFormTest::testSettingsForm public function Tests for \Drupal\advagg_validator\Form\CssLintForm.