Completed
Push — master ( a9d7d4...6320b4 )
by Guillermo A.
03:10
created

ExceptionFactoryTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testReflectionException() 0 6 1
1
<?php
2
3
namespace GuillermoandraeTest\DynamoDb\Factory;
4
5
use Aws\CommandInterface;
6
use Aws\DynamoDb\Exception\DynamoDbException;
7
use Guillermoandrae\DynamoDb\Exception\Exception;
8
use Guillermoandrae\DynamoDb\Factory\ExceptionFactory;
9
use PHPUnit\Framework\TestCase;
10
11
final class ExceptionFactoryTest extends TestCase
12
{
13
    public function testReflectionException()
14
    {
15
        $command = $this->getMockForAbstractClass(CommandInterface::class);
16
        $dynamoDbException = new DynamoDbException('test', $command);
17
        $exception = ExceptionFactory::factory($dynamoDbException);
18
        $this->assertInstanceOf(Exception::class, $exception);
19
    }
20
}
21