Completed
Pull Request — master (#15)
by Marco
02:37
created

CheckedOutRepositoryTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 13
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testFromPath() 0 11 1
1
<?php
2
declare(strict_types=1);
3
4
namespace RoaveTest\ApiCompare\Git;
5
6
use Roave\ApiCompare\Git\CheckedOutRepository;
7
use PHPUnit\Framework\TestCase;
8
9
/**
10
 * @covers \Roave\ApiCompare\Git\CheckedOutRepository
11
 */
12
final class CheckedOutRepositoryTest extends TestCase
13
{
14
    public function testFromPath() : void
15
    {
16
        $path = sys_get_temp_dir() . '/' . uniqid('testPath', true);
17
        mkdir($path, 0777, true);
18
        mkdir($path . '/.git');
19
20
        $checkedOutRepository = CheckedOutRepository::fromPath($path);
21
        self::assertSame($path, (string)$checkedOutRepository);
22
23
        rmdir($path . '/.git');
24
        rmdir($path);
25
    }
26
}
27