Completed
Push — master ( e72a47...d83206 )
by Marco
10s
created

testCheckoutAndRemove()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 14
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 0
dl 0
loc 14
rs 9.4285
c 0
b 0
f 0
1
<?php
2
declare(strict_types=1);
3
4
namespace RoaveTest\ApiCompare\Git;
5
6
use Roave\ApiCompare\Git\CheckedOutRepository;
7
use Roave\ApiCompare\Git\GitCheckoutRevisionToTemporaryPath;
8
use PHPUnit\Framework\TestCase;
9
use Roave\ApiCompare\Git\Revision;
10
11
/**
12
 * @covers \Roave\ApiCompare\Git\GitCheckoutRevisionToTemporaryPath
13
 */
14
final class GitCheckoutRevisionToTemporaryPathTest extends TestCase
15
{
16
    public function testCheckoutAndRemove() : void
17
    {
18
        $sourceRepositoryPath = realpath(__DIR__ . '/../../../');
19
20
        $git = new GitCheckoutRevisionToTemporaryPath();
21
22
        $temporaryClone = $git->checkout(
23
            CheckedOutRepository::fromPath($sourceRepositoryPath),
24
            Revision::fromSha1('428327492a803b6e0c612b157a67a50a47275461')
25
        );
26
27
        self::assertInstanceOf(CheckedOutRepository::class, $temporaryClone);
28
29
        $git->remove($temporaryClone);
30
    }
31
}
32