Passed
Push — master ( 5ae5fc...1c3f43 )
by Giuliano
18:52
created

ViewComponentTestCase   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testVendorProperties() 0 13 1
1
<?php
2
3
namespace Maestriam\Samurai\Tests\Unit\Entities\Vendor;
4
5
use Maestriam\Samurai\Entities\ViewComponent;
6
use Maestriam\Samurai\Tests\TestCase;
7
8
/**
9
 * Testes de funcionalidades de definir/receber informações do vendor do tema
10
 */
11
class ViewComponentTestCase extends TestCase
12
{
13
    /**
14
     * Tenta criar um componente simples e vincular um ViewComponent
15
     * ao arquivo.  
16
     *
17
     * @return  [type]  [return description]
0 ignored issues
show
Documentation Bug introduced by
The doc comment [type] at position 0 could not be parsed: Unknown type name '[' at position 0 in [type].
Loading history...
18
     */
19
    public function testVendorProperties()
20
    {
21
        $name = 'view-component';         
22
        $theme = $this->theme('bands/molchat-doma');
23
        
24
        $theme->findOrCreate()->use();        
25
        $theme->component($name)->create();            
26
27
        $view = new ViewComponent();
28
        $file = $view->getView();
29
30
        $this->assertIsString($file);  
31
        $this->assertNotNull($file);
32
    }
33
}