Same filename in this branch
  1. 5.0.x advagg_old_ie_compatibility/tests/src/Kernel/Form/SettingsFormTest.php
  2. 5.0.x advagg_css_minify/tests/src/Kernel/Form/SettingsFormTest.php
  3. 5.0.x advagg_js_minify/tests/src/Kernel/Form/SettingsFormTest.php
  4. 5.0.x advagg_cdn/tests/src/Kernel/Form/SettingsFormTest.php
  5. 5.0.x tests/src/Kernel/Form/SettingsFormTest.php
  6. 5.0.x advagg_ext_minify/tests/src/Kernel/Form/SettingsFormTest.php
  7. 5.0.x advagg_mod/tests/src/Kernel/Form/SettingsFormTest.php
Same filename in other branches
  1. 6.0.x advagg_bundler/tests/src/Kernel/Form/SettingsFormTest.php
  2. 6.0.x advagg_css_minify/tests/src/Kernel/Form/SettingsFormTest.php
  3. 6.0.x advagg_js_minify/tests/src/Kernel/Form/SettingsFormTest.php
  4. 6.0.x tests/src/Kernel/Form/SettingsFormTest.php
  5. 6.0.x advagg_ext_minify/tests/src/Kernel/Form/SettingsFormTest.php
  6. 6.0.x advagg_mod/tests/src/Kernel/Form/SettingsFormTest.php
  7. 8.x-4.x advagg_old_ie_compatibility/tests/src/Kernel/Form/SettingsFormTest.php
  8. 8.x-4.x advagg_bundler/tests/src/Kernel/Form/SettingsFormTest.php
  9. 8.x-4.x advagg_css_minify/tests/src/Kernel/Form/SettingsFormTest.php
  10. 8.x-4.x advagg_js_minify/tests/src/Kernel/Form/SettingsFormTest.php
  11. 8.x-4.x advagg_cdn/tests/src/Kernel/Form/SettingsFormTest.php
  12. 8.x-4.x tests/src/Kernel/Form/SettingsFormTest.php
  13. 8.x-4.x advagg_ext_minify/tests/src/Kernel/Form/SettingsFormTest.php
  14. 8.x-4.x advagg_mod/tests/src/Kernel/Form/SettingsFormTest.php

Namespace

Drupal\Tests\advagg_bundler\Kernel\Form

File

advagg_bundler/tests/src/Kernel/Form/SettingsFormTest.php

View source
<?php

namespace Drupal\Tests\advagg_bundler\Kernel\Form;

use Drupal\Core\Form\FormInterface;
use Drupal\KernelTests\KernelTestBase;
use Drupal\advagg_bundler\Form\SettingsForm;

/**
 * Tests the Bundler settings form.
 *
 * @group advagg
 */
class SettingsFormTest extends KernelTestBase {
    
    /**
     * The Bundler settings form object under test.
     *
     * @var \Drupal\advagg_bundler\Form\SettingsForm
     */
    protected $settingsForm;
    
    /**
     * Modules to enable.
     *
     * @var array
     */
    protected static $modules = [
        'system',
        'advagg',
        'advagg_bundler',
    ];
    
    /**
     * {@inheritdoc}
     *
     * @covers ::__construct
     */
    protected function setUp() {
        parent::setUp();
        $this->installConfig(static::$modules);
        $this->settingsForm = SettingsForm::create($this->container);
    }
    
    /**
     * Tests for \Drupal\advagg_bundler\Form\SettingsForm.
     */
    public function testSettingsForm() {
        $this->assertInstanceOf(FormInterface::class, $this->settingsForm);
        $id = $this->settingsForm
            ->getFormId();
        $this->assertEquals('advagg_bundler_settings', $id);
        $method = new \ReflectionMethod(SettingsForm::class, 'getEditableConfigNames');
        $method->setAccessible(TRUE);
        $name = $method->invoke($this->settingsForm);
        $this->assertEquals([
            'advagg_bundler.settings',
        ], $name);
    }

}

Classes

Title Deprecated Summary
SettingsFormTest Tests the Bundler settings form.