Passed
Pull Request — master (#17)
by Mihail
15:10
created

HttpStatusTest   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 3
c 1
b 0
f 1
dl 0
loc 16
rs 10
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A it_should_return_status_string_without_code() 0 3 1
A it_should_return_status_string_with_code() 0 3 1
1
<?php
2
3
namespace Tests\Koded\Tests\Http;
4
5
use Koded\Http\StatusCode;
6
use PHPUnit\Framework\TestCase;
7
8
class HttpStatusTest extends TestCase
9
{
10
    /**
11
     * @test
12
     */
13
    public function it_should_return_status_string_without_code()
14
    {
15
        $this->assertSame('Multiple Choices', StatusCode::MULTIPLE_CHOICES());
0 ignored issues
show
Bug introduced by
The method MULTIPLE_CHOICES() does not exist on Koded\Http\StatusCode. 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

15
        $this->assertSame('Multiple Choices', StatusCode::/** @scrutinizer ignore-call */ MULTIPLE_CHOICES());
Loading history...
16
    }
17
18
    /**
19
     * @test
20
     */
21
    public function it_should_return_status_string_with_code()
22
    {
23
        $this->assertSame('401 Unauthorized', StatusCode::UNAUTHORIZED(true));
0 ignored issues
show
Bug introduced by
The method UNAUTHORIZED() does not exist on Koded\Http\StatusCode. 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

23
        $this->assertSame('401 Unauthorized', StatusCode::/** @scrutinizer ignore-call */ UNAUTHORIZED(true));
Loading history...
24
    }
25
}
26