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.

LegTest   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 1
Bugs 1 Features 0
Metric Value
wmc 4
c 1
b 1
f 0
lcom 1
cbo 2
dl 0
loc 49
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A it_has_a_load_location() 0 4 1
A it_has_an_unload_location() 0 4 1
A setUp() 0 10 1
A it_is_same_value_as_leg_with_same_properties() 0 11 1
1
<?php
2
/*
3
 * This file is part of the prooph/php-ddd-cargo-sample package.
4
 * (c) Alexander Miertsch <[email protected]>
5
 *
6
 * For the full copyright and license information, please view the LICENSE
7
 * file that was distributed with this source code.
8
 */
9
namespace CodelinerTest\CargoBackend\Domain\Model\Cargo;
10
11
use Codeliner\CargoBackend\Model\Cargo\Leg;
12
use Codeliner\CargoBackend\Model\Voyage\Voyage;
13
use Codeliner\CargoBackend\Model\Voyage\VoyageNumber;
14
use CodelinerTest\CargoBackend\TestCase;
15
16
/**
17
 * Class LegTest
18
 * 
19
 * @author Alexander Miertsch <[email protected]>
20
 */
21
class LegTest extends TestCase
22
{
23
    /**
24
     * @var Leg
25
     */
26
    private $leg;
27
28
    public function setUp()
29
    {
30
31
        $this->leg = new Leg(
32
            'Hongkong',
33
            'Hamburg',
34
            new \DateTimeImmutable('2014-01-20 10:00:00'),
35
            new \DateTimeImmutable('2014-02-02 18:00:00')
36
        );
37
    }
38
39
    /**
40
     * @test
41
     */
42
    public function it_has_a_load_location()
43
    {
44
        $this->assertEquals('Hongkong', $this->leg->loadLocation());
45
    }
46
47
    /**
48
     * @test
49
     */
50
    public function it_has_an_unload_location()
51
    {
52
        $this->assertEquals('Hamburg', $this->leg->unloadLocation());
53
    }
54
55
    /**
56
     * @test
57
     */
58
    public function it_is_same_value_as_leg_with_same_properties()
59
    {
60
        $sameLeg = new Leg(
61
            'Hongkong',
62
            'Hamburg',
63
            new \DateTimeImmutable('2014-01-20 10:00:00'),
64
            new \DateTimeImmutable('2014-02-02 18:00:00')
65
        );
66
67
        $this->assertTrue($this->leg->sameValueAs($sameLeg));
68
    }
69
}
70