Passed
Pull Request — master (#3)
by Valentin
03:18
created

FileSnapshotTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 12
c 0
b 0
f 0
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testEntity() 0 9 1
1
<?php
2
3
namespace Spiral\Tests\Snapshotter\FileHandler\Entities;
4
5
use Spiral\Snapshotter\FileHandler\Entities\FileSnapshot;
6
use Spiral\Snapshotter\FileHandler\Entities\FileTimestamp;
7
use Spiral\Tests\BaseTest;
8
9
class FileSnapshotTest extends BaseTest
10
{
11
    public function testEntity()
12
    {
13
        $filename = __FILE__;
14
        $entity = new FileSnapshot($filename);
15
16
        $this->assertEquals(basename($filename), $entity->id());
17
        $this->assertEquals($filename, $entity->path());
18
        $this->assertInstanceOf(FileTimestamp::class, $entity->timestamp());
19
    }
20
}