Completed
Push — master ( 95aedb...06e367 )
by Alexey
15:04
created

AnimateCssAssetTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 2
c 0
b 0
f 0
lcom 1
cbo 3
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testRegister() 0 13 2
1
<?php
2
3
namespace tests;
4
5
use dominus77\sweetalert2\assets\AnimateCssAsset;
6
use yii\web\AssetBundle;
7
8
/**
9
 * Class AnimateAssetTest
10
 * @package tests
11
 */
12
class AnimateCssAssetTest extends TestCase
13
{
14
    public function testRegister()
15
    {
16
        $min = YII_ENV_DEV ? '' : '.min';
17
18
        $view = $this->getView();
19
        $this->assertEmpty($view->assetBundles);
20
        AnimateCssAsset::register($view);
21
        $this->assertEquals(2, count($view->assetBundles));
22
        $this->assertTrue($view->assetBundles['dominus77\\sweetalert2\\assets\\AnimateCssAsset'] instanceof AssetBundle);
23
        $content = $view->renderFile('@tests/views/layouts/rawlayout.php');
24
        //$this->assertContains('jquery.js', $content);
25
        $this->assertContains('animate' . $min . '.css', $content);
26
    }
27
}