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

ViewComponentTestCase::testVendorProperties()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 13
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 8
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 13
rs 10
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
}