Failed Conditions
Branch feature/refactoring-samurai (8cc7c1)
by Giuliano
03:47
created

GetCurrentThemeTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 7
dl 0
loc 18
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetInexistingCurrentTheme() 0 5 1
A testGetExistingTheme() 0 9 1
1
<?php
2
3
namespace Maestriam\Samurai\Tests\Feature\Facade;
4
5
use Maestriam\Samurai\Entities\Theme;
6
use Maestriam\Samurai\Support\Samurai;
7
use Maestriam\Samurai\Tests\TestCase;
8
9
class GetCurrentThemeTest extends TestCase
10
{
11
    public function testGetExistingTheme()
12
    {
13
        $theme = new Theme('bands/alice-in-chains');
14
15
        $theme->make()->use();
16
17
        $current = Samurai::base()->current();
0 ignored issues
show
Bug introduced by
The method base() does not exist on Maestriam\Samurai\Support\Samurai. Since you implemented __callStatic, consider adding a @method annotation. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

17
        $current = Samurai::/** @scrutinizer ignore-call */ base()->current();
Loading history...
18
19
        $this->assertValidTheme($current);
20
    }
21
22
    public function testGetInexistingCurrentTheme()
23
    {
24
        $current = Samurai::base()->current();
25
26
        $this->assertNull($current);
27
    }
28
}