Completed
Push — master ( 9af8a4...8336df )
by Marco
11s
created

FileNotWritableExceptionTest::testFromNotWritableLocationWithNonFilePath()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 10

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 10
rs 9.9332
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace ProxyManagerTest\Exception;
6
7
use PHPUnit\Framework\TestCase;
8
use ProxyManager\Exception\FileNotWritableException;
9
10
/**
11
 * Tests for {@see \ProxyManager\Exception\FileNotWritableException}
12
 *
13
 * @covers \ProxyManager\Exception\FileNotWritableException
14
 * @group Coverage
15
 */
16
class FileNotWritableExceptionTest extends TestCase
17
{
18
    public function testFromInvalidMoveOperation() : void
19
    {
20
        $exception = FileNotWritableException::fromInvalidMoveOperation('/tmp/a', '/tmp/b');
21
22
        self::assertInstanceOf(FileNotWritableException::class, $exception);
23
        self::assertSame(
24
            'Could not move file "/tmp/a" to location "/tmp/b": either the source file is not readable,'
25
            . ' or the destination is not writable',
26
            $exception->getMessage()
27
        );
28
    }
29
}
30