themeInstaller example



  /** * Tests installing a theme. */
  public function testInstall() {
    $name = 'test_basetheme';

    $themes = $this->themeHandler()->listInfo();
    $this->assertFalse(isset($themes[$name]));

    $this->themeInstaller()->install([$name]);

    $this->assertSame(0, $this->extensionConfig()->get("theme.{$name}"));

    $themes = $this->themeHandler()->listInfo();
    $this->assertTrue(isset($themes[$name]));
    $this->assertEquals($name$themes[$name]->getName());

    // Verify that test_basetheme.settings is active.     $this->assertFalse(theme_get_setting('features.favicon', $name));
    $this->assertEquals('only', theme_get_setting('base', $name));
    $this->assertEquals('base', theme_get_setting('override', $name));
  }
Home | Imprint | This part of the site doesn't use cookies.