Completed
Pull Request — laravel-5 (#63)
by
unknown
10:04
created

RefreshCommandTest::setUp()   A

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
0 ignored issues
show
Bug introduced by
There is at least one abstract method in this class. Maybe declare it as abstract, or implement the remaining methods: artisan, be, call, seed
Loading history...
7
{
8
    public function tearDown(): void
9
    {
10
        m::close();
11
12
        parent::tearDown();
13
    }
14
15
    public function testNoLocalesConfigException()
16
    {
17
        // Mock Config
18
        Illuminate\Support\Facades\Config::swap($config = m::mock('ConfigMock'));
19
20
        $config->shouldReceive('get')->with('js-localization.locales')
21
          ->andReturn(null);
22
23
24
        $this->setExpectedException('Exception');
0 ignored issues
show
Bug introduced by
The method setExpectedException() does not exist on RefreshCommandTest. Did you maybe mean setExpectedExceptionFromAnnotation()?

This check marks calls to methods that do not seem to exist on an object.

This is most likely the result of a method being renamed without all references to it being renamed likewise.

Loading history...
25
26
        $this->runCommand();
27
    }
28
29
    protected function runCommand()
30
    {
31
        $cmd = new RefreshCommand();
32
33
        $cmd->run(
34
            new Symfony\Component\Console\Input\ArrayInput(['package' => 'foo']),
35
            new Symfony\Component\Console\Output\NullOutput
36
        );
37
    }
38
39
}
40