DirectivesFromThemeTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 16
rs 10
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A testDirectives() 0 14 2
1
<?php
2
3
namespace Maestriam\Samurai\Tests\Unit\Entities\Theme;
4
5
use Maestriam\Samurai\Entities\Component;
6
use Maestriam\Samurai\Tests\TestCase;
7
8
class DirectivesFromThemeTest extends TestCase
9
{
10
    public function testDirectives()
11
    {
12
        $theme = $this->theme('bands/icon')->findOrCreate();
13
14
        $theme->component('musics/danger-calling')->create();
15
        $theme->component('musics/night-of-the-crime')->create();
16
        $theme->component('musics/missing')->create();
17
18
        $directives = $theme->directives();
19
20
        $this->assertIsArray($directives);
21
22
        foreach ($directives as $directive) {
23
            $this->assertInstanceOf(Component::class, $directive);
24
        }
25
    }
26
}