EnvironmentTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 9
c 1
b 0
f 0
dl 0
loc 18
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testKnowsWhichEnvironmentItIs() 0 16 1
1
<?php
2
3
namespace RemotelyLiving\PHPEnv\Tests\Unit;
4
5
use RemotelyLiving\PHPEnv\Environment;
6
use RemotelyLiving\PHPEnv\EnvironmentType;
7
8
class EnvironmentTest extends AbstractTestCase
9
{
10
    public function testKnowsWhichEnvironmentItIs(): void
11
    {
12
        $this->assertTrue(
13
            Environment::create(EnvironmentType::DEVELOPMENT())->is(EnvironmentType::DEVELOPMENT())
14
        );
15
16
        $this->assertTrue(
17
            Environment::create(EnvironmentType::STAGE())->is(EnvironmentType::STAGE())
18
        );
19
20
        $this->assertTrue(
21
            Environment::create(EnvironmentType::QA())->is(EnvironmentType::QA())
22
        );
23
24
        $this->assertTrue(
25
            Environment::create(EnvironmentType::PRODUCTION())->is(EnvironmentType::PRODUCTION())
26
        );
27
    }
28
}
29