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

AwsS3BuilderTest::testWrongFsInfoFailed()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 4
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 8
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Spiral\Tests\Storage\Unit\Builder;
6
7
use Spiral\Storage\Builder\Adapter\AwsS3Builder;
8
use Spiral\Storage\Config\DTO\FileSystemInfo\LocalInfo;
9
use Spiral\Storage\Exception\StorageException;
10
use Spiral\Tests\Storage\Traits\LocalFsBuilderTrait;
11
use Spiral\Tests\Storage\Unit\UnitTestCase;
12
13
class AwsS3BuilderTest extends UnitTestCase
14
{
15
    use LocalFsBuilderTrait;
16
17
    public function testWrongFsInfoFailed(): void
18
    {
19
        $this->expectException(StorageException::class);
20
        $this->expectExceptionMessage(
21
            \sprintf('Wrong filesystem info `%s` provided for `%s`', LocalInfo::class, AwsS3Builder::class)
22
        );
23
24
        new AwsS3Builder($this->buildLocalInfo());
25
    }
26
}
27