RefreshCommandTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
use Mockery as m;
4
use JsLocalization\Console\RefreshCommand;
5
6
class RefreshCommandTest extends TestCase
7
{
8
9
    public function setUp()
10
    {
11
        parent::setUp();
12
    }
13
14
    public function tearDown()
15
    {
16
        m::close();
17
18
        parent::tearDown();
19
    }
20
21
    public function testNoLocalesConfigException()
22
    {
23
        // Mock Config
24
        Illuminate\Support\Facades\Config::swap($config = m::mock('ConfigMock'));
25
26
        $config->shouldReceive('get')->with('js-localization.locales')
27
          ->andReturn(null);
28
29
30
        $this->setExpectedException('Exception');
31
32
        $this->runCommand();
33
    }
34
35
    protected function runCommand()
36
    {
37
        $cmd = new RefreshCommand();
38
39
        $cmd->run(
40
            new Symfony\Component\Console\Input\ArrayInput(['package' => 'foo']),
41
            new Symfony\Component\Console\Output\NullOutput
42
        );
43
    }
44
45
}
46