BlobGeneratorTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testFileTooLarge() 0 7 1
1
<?php
2
3
namespace DBFaker\Generators;
4
5
use DBFaker\Exceptions\FileTooLargeException;
6
use Doctrine\DBAL\Schema\Column;
7
use Doctrine\DBAL\Types\BlobType;
8
use Doctrine\DBAL\Types\Type;
9
use PHPUnit\Framework\TestCase;
10
11
class BlobGeneratorTest extends TestCase
12
{
13
14
    public function testFileTooLarge()
15
    {
16
        $column = new Column('foo', Type::getType(Type::BINARY));
17
        $column->setLength(255);
18
        $blobGenerator = new BlobGenerator(__DIR__.'/../fixtures/blob/*.png', $column);
19
        $this->expectException(FileTooLargeException::class);
20
        $blobGenerator->__invoke();
21
    }
22
}
23