public function testRegister()
 {
     $view = Yii::$app->getView();
     $this->assertEmpty($view->assetBundles);
     ThemeAsset::register($view);
     $this->assertEquals(7, count($view->assetBundles));
     $this->assertArrayHasKey('webtoolsnz\\AdminLte\\ThemeAsset', $view->assetBundles);
     $this->assertTrue($view->assetBundles['webtoolsnz\\AdminLte\\ThemeAsset'] instanceof AssetBundle);
     $content = $view->renderFile('@tests/views/layouts/raw.php');
     $this->assertContains('font-awesome.min.css', $content);
     $this->assertContains('AdminLTE.min.css', $content);
     $this->assertContains('bootstrap.css', $content);
     $this->assertContains('overrides.css', $content);
     $this->assertContains('jquery.js', $content);
     $this->assertContains('yii.js', $content);
     $this->assertContains('bootstrap.js', $content);
     $this->assertContains('app.min.js', $content);
 }
Esempio n. 2
0
<?php

/**
 * @var $this \yii\web\View
 * @var $content string
 */
use webtoolsnz\AdminLte\ThemeAsset;
ThemeAsset::register($this);
?>

<?php 
$this->beginPage();
?>
<!DOCTYPE html>
<html lang="<?php 
echo Yii::$app->language;
?>
">

<?php 
echo $this->render('//layouts/head');
?>

<body class="hold-transition <?php 
echo $this->theme->skin;
?>
 sidebar-mini">
<div class="wrapper">

    <!-- Header Begin -->
    <?php