Passed
Pull Request — master (#407)
by Kirill
06:33
created

LocalBuilderTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
c 1
b 0
f 0
dl 0
loc 12
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A testWrongServerInfoFailed() 0 8 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Tests\Storage\Unit\Builder;
6
7
use Spiral\Storage\Builder\Adapter\LocalBuilder;
8
use Spiral\Storage\Config\DTO\FileSystemInfo\Aws\AwsS3Info;
9
use Spiral\Storage\Exception\StorageException;
10
use Spiral\Tests\Storage\Traits\AwsS3FsBuilderTrait;
11
use Spiral\Tests\Storage\Unit\UnitTestCase;
12
13
class LocalBuilderTest extends UnitTestCase
14
{
15
    use AwsS3FsBuilderTrait;
16
17
    public function testWrongServerInfoFailed(): void
18
    {
19
        $this->expectException(StorageException::class);
20
        $this->expectExceptionMessage(
21
            \sprintf('Wrong filesystem info `%s` provided for `%s`', AwsS3Info::class, LocalBuilder::class)
22
        );
23
24
        new LocalBuilder($this->buildAwsS3Info());
25
    }
26
}
27