GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

TailCommandTest   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 44
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A it_will_throw_an_exception_if_the_given_environment_is_not_configured() 0 8 1
A the_tail_command_is_correct() 0 8 1
A the_tail_command_with_file_is_correct() 0 9 1
A the_command_when_grepping_is_correct() 0 9 1
1
<?php
2
3
namespace Spatie\Tail\Tests;
4
5
class TailCommandTest 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...
6
{
7
    /** @test */
8
    public function it_will_throw_an_exception_if_the_given_environment_is_not_configured()
9
    {
10
        $this->expectExceptionMessageMatches('/^No configuration set/');
11
12
        $this->artisan('tail', [
13
            'environment' => 'non-existing-environment',
14
        ]);
15
    }
16
17
    /** @test */
18
    public function the_tail_command_is_correct()
19
    {
20
        $this
21
            ->artisan('tail', [
22
                '--debug' => true,
23
            ])
24
            ->expectsOutput('tail -f -n 0 "`ls -t | head -1`"');
25
    }
26
27
    /** @test */
28
    public function the_tail_command_with_file_is_correct()
29
    {
30
        $this
31
            ->artisan('tail', [
32
                '--debug' => true,
33
                '--file' => 'file.log',
34
            ])
35
            ->expectsOutput('tail -f -n 0 "file.log"');
36
    }
37
38
    /** @test */
39
    public function the_command_when_grepping_is_correct()
40
    {
41
        $this
42
            ->artisan('tail', [
43
                '--debug' => true,
44
                '--grep' => 'test',
45
            ])
46
            ->expectsOutput('tail -f -n 0 "`ls -t | head -1`" | grep "test"');
47
    }
48
}
49